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
install_github: API rate limit exceeded #210
Comments
|
The results of |
|
Rate limit is local. I can't replicate this issue after installing from devtools AND hours later. It was only for this package but I had just installed 8 more github packages. The error seems to be related to the API call which I assume devtools is not using but remotes is. I would assume then that this issue isn't reproducible in that you'd have to hit you're limit in that session but I'd say installing 8 github packages in one fell swoop isn't uncommon, especially after a new R build. |
|
So the information we are using the GitHub API for in remotes is to retrieve the package names and the SHA of the current version. The current CRAN version of devtools uses a remotes uses the API to retrieve both pieces of information. The benefits to using the API is that it works seamlessly for GitHub enterprise as well as private repositories. Neither GitHub has a rate limit of 60 requests per hour for unauthenticated requests, but 5000 an hour for authenticated requests. So the easiest solution is to create a GitHub PAT, with |
|
@jimhester I have a test in pacman that attempts to install packages from github. In doing so I wound up with a rate limit error on CRAN. I got no such erros on Winbuilder dev or release and not locally either. Later I was told it was a false positive but I see it still has the same error on Debian. Again, for the CRAN error I share below I was later told this was a false positive and pacman was on its way to CRAN. That being said I worry that it will come back if the rate limit is close.
Also releated...travis ci seems to error now for any repo when the rate limit is hit. I think it's how I have the travis.yml script configured: https://travis-ci.org/trinker/textclean This also seems to be an error with devtools::install_github() not remotes. Just raising this here. Let me know if I should open another issue at devtools, or if there's a fix in the works, and/or if it's how I have travis.yml file set up: https://github.com/trinker/textclean/blob/master/.travis.yml Error that CRAN emailed |
|
@trinker GitHub has been half-dead all day: https://status.github.com/messages |
|
@gaborcsardi Ah makes sense |
|
@trinker I also experienced the rate limit error on travis and was able to avoid it with a small modification of the Maybe this is helpful for you or anybody else who stumbles upon this thread. |
|
@nevrome remotes has a GitHub token now, so if you update it, all should be good. This said, if you have |
|
@gaborcsardi Nice - thanks for the fast fix! But: Is it really good practice to add another token if it's not necessary? Isn't every token a theoretical security vulnerability? |
I mean, add it as a secret Travis environment variable, not to the files of the repository. The token should only have read-only access. So if you have public repos only, it'll only have access to public data. If you have private repos, then yeah, it needs read-only access to those. Also, you can use the same token for all you repos, no need to create a new one every time. |
|
The token doesn't even need read-only access, it actually needs no permissions at all. |
|
Jim described one approach above using Renvir but I think that was for local use not travis integration on GitHub. For that I took a slightly different process and wanted to document for others. For adding your own encrypted token variables I did this and it works. The steps were:
Command line to encrypt token (this is a fake token I'm sharing of course)What the envir var looks like in the remotes package |
|
@trinker You can absolutely use this method to add the encrypted variable to your |
|
Would the developers be open to being able to set and environment variable changing the default remote for packages missing a
I would be happy to contribute it if so |
|
@Paxanator I am not sure what you mean, you can already set up the default the standard way, using |
|
Will do! |
|
Just documenting for those like me who like a simple solution spelled out:
|
|
Got the same issue and solved by following this link https://gist.github.com/z3tt/3dab3535007acf108391649766409421 Need to set up GitHub account to avoid this rate limit error.
|
For version 2.0.0
remotes::install_githubI am running into the following error versus thedevtools::install_githubwhich has no such error.remotes installing github package
devtools installing github package: no problems
The text was updated successfully, but these errors were encountered: