Connect a local repo with GitHub.
use_github(auth_token = github_pat(), private = FALSE, pkg = ".", protocol = c("ssh", "https"), credentials = NULL)
- Provide a personal access token (PAT) from
https://github.com/settings/tokens. Defaults to the
TRUE, creates a private repository.
- Path to package. See
as.packagefor more information.
- transfer protocol, either "ssh" (the default) or "https"
cred_ssh_keyspecifying specific ssh credentials or NULL for default ssh key and ssh-agent behaviour. Default is NULL.
A new GitHub repo will be created via the GitHub API, therefore you must
provide a GitHub personal access token (PAT) via the argument
auth_token, which defaults to the value of the
environment variable. Obtain a PAT from
protocol reflects how you wish to authenticate with
GitHub for this repo in the long run. For either
protocol, a remote
named "origin" is created, an initial push is made using the specified
protocol, and a remote tracking branch is set. The URL of the
"origin" remote has the form
protocol = "ssh", the default) or
protocol = "ssh", it is assumed that public and
private keys are in the default locations,
~/.ssh/id_rsa, respectively, and that
ssh-agent is configured
to manage any associated passphrase. Alternatively, specify a
cred_ssh_key object via the
## to use default ssh protocol create("testpkg") use_github(pkg = "testpkg") ## or use https create("testpkg2") use_github(pkg = "testpkg2", protocol = "https")