add_github_user: Add a user via their GitHub username.

Description Usage Arguments See Also Examples

View source: R/users.R

Description

On GitHub, a user can upload multiple keys. This function will download the first key by default, but you can change this

Usage

1
add_github_user(github_user, email = NULL, vault = NULL, i = 1)

Arguments

github_user

User name on GitHub.

email

Email address of the github user. If NULL, constructs an email as github-<<github_user>>

vault

Vault location (starting point to find the vault). To create a vault, use create_vault() or create_package_vault(). If this is NULL, then secret tries to find the vault automatically:

  • If the secret.vault option is set to path, that is used as the starting point.

  • Otherwise, if the R_SECRET_VAULT environment variable is set to a path, that is used as a starting point.

  • Otherwise the current working directory is used as the starting point.

If the starting point is a vault, that is used. Otherwise, if the starting point is in a package tree, the inst/vault folder is used within the package. If no vault can be found, an error is thrown.

i

Integer, indicating which GitHub key to use (if more than one GitHub key exists).

See Also

add_travis_user()

Other user functions: add_travis_user, add_user, delete_user, list_users

Examples

1
2
3
4
5
6
vault <- file.path(tempdir(), ".vault")
create_vault(vault)

add_github_user("hadley", vault = vault)
list_users(vault = vault)
delete_user("github-hadley", vault = vault)

secret documentation built on June 20, 2017, 9:13 a.m.