-
Notifications
You must be signed in to change notification settings - Fork 841
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
Running stack templates bumps into Github API limit #1251
Comments
Based on the info at https://developer.github.com/v3/#rate-limiting, looks like the rate limit for unauthenticated users is 60 requests per hour, keyed by the client IP address (and not the resource being accessed). Probably wouldn't be an issue for most people, but if you're sharing a proxy or NAT with others also using the Github API it would be easy to exceed. Probably would be better to have some other way to get a list of templates. Adding a file containing a list of templates is probably easiest, but annoying to have to maintain. @chrisdone, since you added the feature, any thoughts? |
BTW, @bitemyapp, being authenticated with Github in the web browser shouldn't make any difference, since Stack doesn't pass any authentication info along with the API request. |
On the plus side, if this is by IP address, I need to track down the other Haskellers in my building. |
@stephenjbarr The others wouldn't necessarily be Haskellers, just users of the Github API. |
Oh I see. This happened from a large co-working space in Seattle so I can see this happening. I know I wasn't making requests at this rate. |
Generating token by following https://help.github.com/articles/creating-an-access-token-for-command-line-use/ and teaching it to Alternatively there is an oauth authorisation api by I don't have any experience with it. |
Yeah, it's a lot to do for one minor feature. I think just not using the Github API would be quite a bit easier. |
Same with |
Same happened for me when running
maybe it makes sense to allow people to authenticate requests using credentials provided in predefined env variables. (I am following the
and for personal token:
The place in the code I would apply this is here: stack/src/Network/HTTP/Download.hs Line 119 in 99ecb78
This in theory should raise the limits to the personal ones, as stated here: https://developer.github.com/v3/#rate-limiting |
@kubek2k would you explain what you mean by this? (Note: |
@dbaynard sorry for not being perfectly clear. While running |
This command no longer makes Github API calls and should no longer hit the rate limit, closing. |
Comes by way of @stephenjbarr
I don't know how Github limits API requests here. I imagined it is partly keyed by the resource being accessed, but I don't know what else factors in (IP address?)
Does anyone know the usual way to cope with this without obligating the user to sign up for credentials?
The text was updated successfully, but these errors were encountered: