toomanyrequests policy resource_error ai_generated true

错误:请求过多:您已达到拉取速率限制。您可以通过身份验证来提高限制。

Error: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating.

ID: policy/github-container-registry-pull-limit-exceeded

其他格式: JSON · Markdown 中文 · English
88%修复率
87%置信度
1证据数
2024-02-10首次发现

版本兼容性

版本状态引入弃用备注
GitHub Container Registry (2024-01) active
Docker 24.0 active

根因分析

GitHub容器注册表对匿名拉取实行速率限制;未经身份验证的请求会快速达到限制。

English

GitHub Container Registry enforces anonymous pull rate limits; unauthenticated requests hit the limit quickly.

generic

官方文档

https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry

解决方案

  1. Authenticate to GitHub Container Registry: `echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin` then retry the pull.
  2. In CI/CD, set the GITHUB_TOKEN environment variable and use `docker login ghcr.io -u $GITHUB_ACTOR -p $GITHUB_TOKEN` before pulling images.

无效尝试

常见但无效的做法:

  1. 70% 失败

    The limit resets slowly (typically 1-6 hours); waiting may not be practical for CI/CD pipelines.

  2. 60% 失败

    The error is specific to GitHub Container Registry; switching registries requires configuration changes and may break dependencies.

  3. 90% 失败

    GitHub does not allow users to increase the limit; authentication is the only mitigation.