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

- **ID:** `policy/github-container-registry-pull-limit-exceeded`
- **领域:** policy
- **类别:** resource_error
- **错误码:** `toomanyrequests`
- **验证级别:** ai_generated
- **修复率:** 88%

## 根因

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

## 版本兼容性

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

## 解决方案

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.
   ```

## 无效尝试

- **** — The limit resets slowly (typically 1-6 hours); waiting may not be practical for CI/CD pipelines. (70% 失败率)
- **** — The error is specific to GitHub Container Registry; switching registries requires configuration changes and may break dependencies. (60% 失败率)
- **** — GitHub does not allow users to increase the limit; authentication is the only mitigation. (90% 失败率)
