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

GitHub API rate limiting #3853

Closed
g2p opened this issue Feb 17, 2020 · 1 comment · Fixed by #5031
Closed

GitHub API rate limiting #3853

g2p opened this issue Feb 17, 2020 · 1 comment · Fixed by #5031

Comments

@g2p
Copy link

g2p commented Feb 17, 2020

While running scoop search multiple times, I've hit GitHub's API rate limit.

The message looks like this on scoop stderr:

invoke-webrequest : {"message":"API rate limit exceeded for IPADDRESS. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation    for more details.)","documentation_url":"https://developer.github.com/v3/#rate-limiting"}

curl.exe -i https://api.github.com/ confirms it's a 60 req/hour limit that's been hit.

Is there a way to authenticate with GitHub and get a bit more quota?

@mmelvin0
Copy link

mmelvin0 commented Apr 5, 2020

Just ran into this and it seems like this can be accomplished with GithHub personal access tokens.

Would need to add something like this:

-Headers @{'Authorization' = 'token $TOKEN'}

To the the Invoke-WebRequest call here: https://github.com/lukesampson/scoop/blob/a9fa775d59b14e7dce335313faa0eff855469764/libexec/scoop-search.ps1#L52

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

Successfully merging a pull request may close this issue.

2 participants