Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected interaction between GITHUB_PAT and CRAN-like repo #481

Closed
copernican opened this issue Feb 28, 2020 · 1 comment
Closed

Unexpected interaction between GITHUB_PAT and CRAN-like repo #481

copernican opened this issue Feb 28, 2020 · 1 comment

Comments

@copernican
Copy link

An Artifactory repo can be used to host internally developed R packages. Packages can be installed with a command like

install.packages("foo", repos = "https://our.repo/"

To install a specific version of foo from this repo, I tried

install_version("foo", "x.y.z")

but this fails with a 401 error. This seems to be related to whether GITHUB_PAT is set. I've edited the below reprex to sanitize the internal repo and package details.

remotes::install_version("foo", "x.y.z", upgrade = "never")
#> Downloading package from url: https://our.repo/src/contrib/foo_x.y.z.tar.gz
#> Error: Failed to install 'unknown package' from URL:
#>   HTTP error 401.
#>   Bad credentials
#> 
#>   Rate limit remaining: 47/60
#>   Rate limit reset at: 2020-02-28 18:40:55 UTC
#> 
#> 
Sys.unsetenv("GITHUB_PAT")
remotes::install_version("foo", "x.y.z", upgrade = "never")
#> Downloading package from url: https://our.repo/src/contrib/foo_x.y.z.tar.gz
#> Installing package into '/usr/local/lib/R/3.6/site-library'
#> (as 'lib' is unspecified)

I'm using remotes 2.1.1.

Created on 2020-02-28 by the reprex package (v0.3.0)

@jimhester
Copy link
Member

This seems like a duplicate of #440

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants