zyedidia / eget

Easily install prebuilt binaries from GitHub.
MIT License
1.03k stars 43 forks source link

403 Forbidden: API rate limit exceeded #7

Closed muralikodali closed 2 years ago

muralikodali commented 3 years ago

I have got the following error :

403 Forbidden: API rate limit exceeded for 183.82.157.82. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.): https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting
zyedidia commented 3 years ago

GitHub has a rate limit for unauthenticated API requests: you can only make 60 per hour. I could add some authentication to eget which would allow you to raise this limit to 5000 per hour by providing a valid GitHub oauth token in the GITHUB_TOKEN environment variable. Currently the code implementing this is commented out in download.go due to being untested.

thorstenkampe commented 2 years ago

Any news on this?

zyedidia commented 2 years ago

I have pushed the update. Using GITHUB_TOKEN should now allow you to make more requests per hour.

muralikodali commented 2 years ago

after installing new version, problem subsided for two days and repeating again.

zyedidia commented 2 years ago

Have you set up a GitHub OAuth token? With the token you should not see this problem unless you are exceeding 5,000 requests per hour.

muralikodali commented 2 years ago

screenshot_20211123115405

I have also checked with wireshark to find out any requests are being made with github. there is no abnormal traffic to github.

zyedidia commented 2 years ago

Does the problem occur every time you use eget, or only in certain circumstances?

muralikodali commented 2 years ago

it occurs every time when using eget

zyedidia commented 2 years ago

I have pushed an update with a possible fix and a new option --rate which will display rate limiting information (total and remaining allowed requests) to help you diagnose the issue further.

muralikodali commented 2 years ago

thanks for the update.

it is now working without errors.

small_screenshot_20211124171322

thorstenkampe commented 2 years ago

I have the same problem with 0.3.0 - would you be able to make the fix available with a new release?

zyedidia commented 2 years ago

Yes no problem, I will release 0.3.1 later today.

thorstenkampe commented 2 years ago

eget uses now GITHUB_TOKEN. A side note: --rate seems mutually exclusive with all other options. Help for this option should make this explicit in my opinion.