git - github API 速率限制是每个用户还是每个域/IP 地址?

标签 git github oauth github-api rate-limiting

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/

相关文章:

git - 部署游戏!到 heroku

即使有 5.6GB 空闲内存和 50GB 硬盘,git clone 也会出现内存不足的情况

git - 如何通过哈希验证 Git 安装程序?

python - git merge 与我们的数据库文件冲突(多个开发人员)

github - 使用 Travis 调用 GitHub API 构建 Tag

java - 如何使用 Restful 调用 Auth 身份验证

git - 如何在与本地机器连接不稳定的远程机器上获取、 pull git repo

Github代码库: how to check if a repo is classified as active

oauth - 获取无效的 oauth 访问 token : where is the token I need?

api - 托弗 API : What does the message "Not a valid OAuth signed request" mean?