Creates a Circle CI "user-key" (= SSH key pair) if none exists yet to enable deployment from Circle CI builds to GitHub.

  repo = github_info()$name,
  user = github_info()$owner$login,
  quiet = FALSE



The repository slug to use. Must follow the "user/repo" structure.


The username for the repository. By default queried using get_user().


If TRUE, console output is suppressed.


The easiest way to achieve a deployment from Circle CI builds to a Github repo is by creating a so called "user-key" (i.e. an SSH key pair) on Circle CI.

use_circle_deploy() tries to be smart by exiting early if such a key is already present.

If the repo has not been enabled yet on Circle CI, please run enable_repo() first. Also to be able to authenticate to Github in the first place a personal access token needs to be set (via env var GITHUB_TOKEN). usethis::github_token() can be used to check if one is already set. If none is set, this function will prompt you to create one.


if (FALSE) { use_circle_deploy() }