# 错误：凭据助手 'desktop' 未安装或未配置。运行 'docker login' 来配置凭据。

- **ID:** `cicd/docker-credential-helper-not-configured`
- **领域:** cicd
- **类别:** auth_error
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

Docker 凭据助手（例如 desktop、ecr-login）未在 CI 环境中安装或配置，导致无法向私有注册表进行身份验证。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Docker 24.0.5 | active | — | — |
| Docker Desktop 4.22.0 | active | — | — |
| Amazon ECR Docker Credential Helper 0.7.1 | active | — | — |

## 解决方案

1. ```
   Install the credential helper: For Docker Desktop on Linux, run: sudo apt-get install docker-credential-desktop. Then verify: docker-credential-desktop list. Alternatively, use the 'pass' credential store.
   ```
2. ```
   Disable credential helpers temporarily by setting the config to store credentials in plain text (not recommended for production): echo '{"credsStore":""}' > ~/.docker/config.json && docker login
   ```

## 无效尝试

- **** — Running docker login without specifying the credential store may still fail if the helper path is missing. (40% 失败率)
- **** — Setting DOCKER_CONFIG to a non-existent path can break other Docker commands. (30% 失败率)
