repo_auth {pkgcache}R Documentation

Authenticated repositories

Description

repo_auth() lists authentication information for all configured repositories.

Usage

repo_auth(
  r_version = getRversion(),
  bioc = TRUE,
  cran_mirror = default_cran_mirror(),
  check_credentials = TRUE
)

Arguments

r_version

R version(s) to use for the Bioconductor repositories, if bioc is TRUE.

bioc

Whether to add Bioconductor repositories, even if they are not configured in the repos option.

cran_mirror

The CRAN mirror to use, see default_cran_mirror().

check_credentials

Whether to check that credentials are available for the authenticated repositories.

Details

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>

pkgcache tries to obtain the passwords for the authenticated CRAN-like repos from two sources, in this order:

  1. A "netrc" file. If the NETRC environment variable is set, it should point to a file in "netrc" format. Otherwise pkgcache uses the ⁠~/.netrc⁠ file in the current user's home directory, if it exists. On Windows it also tries the ⁠~/_netrc⁠ file.

  2. The system's credential store, via the keyring package.

See the documentation of libcurl for details about the format of the netrc file.

When looking for the password in the system credential store, pkgcache looks at the following 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.

Value

Data frame with columns:


[Package pkgcache version 2.2.4 Index]