# 错误：命令以退出状态128出错：git clone --filter=blob:none 'git@github.com:user/private-repo.git' /tmp/pip-req-build-xxxxx

- **ID:** `pip/error-command-errored-out-exit-status-128-git-clone`
- **领域:** pip
- **类别:** auth_error
- **错误码:** `ERROR`
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

pip克隆私有Git仓库失败，因为SSH密钥或认证凭据配置不正确，或用户缺少对仓库的访问权限。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| pip 21.0 | active | — | — |
| pip 22.0 | active | — | — |
| pip 23.0 | active | — | — |

## 解决方案

1. ```
   将SSH密钥添加到SSH代理：`eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_rsa` 并用 `ssh -T git@github.com` 测试。
   ```
2. ```
   使用个人访问令牌通过HTTPS安装：`pip install git+https://<token>@github.com/user/private-repo.git`
   ```

## 无效尝试

- **** — HTTPS authentication requires a personal access token or password, which is not set in the URL. (70% 失败率)
- **** — If SSH key is not set up, manual clone will also fail with permission denied. (60% 失败率)
