-
Notifications
You must be signed in to change notification settings - Fork 153
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
Error using install_github()
: HTTP error 401. Bad credentials.
#641
Comments
Should be fixed by 77966d4 |
Is there an ETA of when the fix will be published in the CRAN package? |
@PGijsbers you should not really be relying on the bundled PAT, either you your own PAT or use the automatically supplied GITHUB_TOKEN as a PAT, e.g. env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
Thanks. We're not (just) running the installation in CI so I'll need to do some additional tinkering to allow users to supply their own PAT. It still seems odd that downloading public repositories requires a PAT (this concern of the original post was not addressed). |
Using the PAT is only to increase the rate limits. The default rate limit for unauthenticated requests is only 60 per hour, and remotes needs to do a API request for all packages being installed, to verify their versions and see if they need to be updated. You can do it without the PAT but you may then find you are running into rate limits often. |
Ah, that makes sense. Thanks! |
@jimhester It was working for me for a while when I upgraded to
Note that I'm not also getting it when trying to install CRAN dependencies too:
In case it helps, here's my
Here are the results of my
Sorry for the direct message. I wasn't sure if you'd receive it now that the issue is closed. Thanks! |
Add GIT_TOKEN See r-lib/remotes#641
Getting a similar error on a private gitlab repos:
Here is my .gitlab-ci.yml file:
|
I had a similar issue while trying to use Fails:
with error:
Passes:
with:
|
I'm trying to install an R package from a publicly available GitHub repo using
install_github()
from the{remotes}
package. I'm doing this in the context of a Docker image (rocker/verse
) using a GitLab runner that that will output a book to GitLab Pages using{bookdown}
. However, I receive an error when trying to install an R package ({uroc}) from a publicly available GitHub repo (https://github.com/evwalz/uroc).Here is a minimal reproducible example based on my
.gitlab-ci.yml
file:Here is the error I receive:
Interestingly, I can install it fine when running the code locally, and when I run the Docker container locally, the package installs fine, as well. So it appears to be some interaction of the Docker container with the GitLab runner.
The issue appears to be similar to other issues:
#638
#481
#330
r-lib/devtools#1676
Azure/doAzureParallel#359
https://gist.github.com/Z3tt/3dab3535007acf108391649766409421
For instance, in Issue #638, the user was able to fix the HTTP error 401 on GitHub Actions by defining GITHUB_PAT with the job's token:
The user in the other thread noted that it seems that relying on the bundled PAT is not robust. However, I'm not sure how to do that in the context of a GitLab runner (not GitHub Actions) in my
.gitlab-ci.yml
file. Also, please note that I'm trying to download an R package from a publicly available GitHub repo, so it shouldn't require at Personal Access Token (PAT).Here's my
sessionInfo()
:The text was updated successfully, but these errors were encountered: