repo_auth | R Documentation |
pkgcache supports HTTP basic authentication when interacting with CRAN-like repositories. To use authentication, include a username in the repo URL:
https://<username>@<repo-host>/<repo-path>
repo_auth(
r_version = getRversion(),
bioc = TRUE,
cran_mirror = default_cran_mirror(),
check_credentials = TRUE
)
r_version |
R version(s) to use for the Bioconductor repositories,
if |
bioc |
Whether to add Bioconductor repositories, even if they
are not configured in the |
cran_mirror |
The CRAN mirror to use, see
|
check_credentials |
Whether to check that credentials are available for authenticated repositories. |
pkgcache will look up password for this url and username from the
the user's .netrc
file and from the system credential store using
the keyring package. For the URL above it tries the following keyring
keys, in this order:
https://<username>@repo-host/<repo-path> https://repo-host/<repo-path> https://<username>@repo-host https://repo-host
To add an authenticated repository use repo_add()
with the username
argument. Alternatively, you can set the repos
option directly using
base::options()
and including the username in the repository URL.
repo_auth()
lists authentication information for all configured
repositories.
Data frame with columns:
all columns from the output of repo_get()
,
auth_domains
: authentication domains. pkgcache tries to find the
credentials for these domains, until the search is successful or all
domains fail.
auth_domain
: if the credential lookup is successful, then this is
the authentication domain that was used to get the credentials.
auth_source
: where the credentials were found. E.g.
keyring:<backend>
means it was in the default macos keyring.
auth_error
: for failed credential searches this is the description
of why the search failed. E.g. maybe the keyring package is not
installed, or pkgcache found no credentials for any of the
authentication domains.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.