Github 文档说:
For requests using Basic Authentication or OAuth, you can make up to 5,000 requests per hour
这个限制是针对每个用户的,即针对每个访问 token ,还是针对每个 IP 地址?
例如,如果我有 10 个 OAuth 授权用户使用我的服务器应用程序从 github api 访问数据,我的服务器 ip 的限制是每小时 5k 还是 5k x 10?
最佳答案
紧随您问题中引用的句子之后的两句话contain the answer :
For requests using Basic Authentication or OAuth, you can make up to 5,000 requests per hour. For unauthenticated requests, the rate limit allows you to make up to 60 requests per hour. Unauthenticated requests are associated with your IP address, and not the user making requests.
因此,经过身份验证的请求的速率限制适用于用户帐户,而不是 IP 地址。
如果您仍然怀疑,您可以通过查看 GitHub API 的响应中包含的 X-RateLimit-*
header 来检查您的速率限制状态。或通过专线Rate Limit API .
关于git - github API 速率限制是每个用户还是每个域/IP 地址?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38482640/