ERROR
pip
auth_error
ai_generated
true
错误:命令以退出状态128出错:git clone --filter=blob:none '[email protected]:user/private-repo.git' /tmp/pip-req-build-xxxxx
ERROR: Command errored out with exit status 128: git clone --filter=blob:none '[email protected]:user/private-repo.git' /tmp/pip-req-build-xxxxx
ID: pip/error-command-errored-out-exit-status-128-git-clone
85%修复率
90%置信度
1证据数
2024-01-10首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| pip 21.0 | active | — | — | — |
| pip 22.0 | active | — | — | — |
| pip 23.0 | active | — | — | — |
根因分析
pip克隆私有Git仓库失败,因为SSH密钥或认证凭据配置不正确,或用户缺少对仓库的访问权限。
English
Pip failed to clone a private Git repository because the SSH key or authentication credentials are not configured correctly, or the user lacks access to the repository.
官方文档
https://pip.pypa.io/en/stable/topics/vcs-support/解决方案
-
将SSH密钥添加到SSH代理:`eval "$(ssh-agent -s)" && ssh-add ~/.ssh/id_rsa` 并用 `ssh -T [email protected]` 测试。
-
使用个人访问令牌通过HTTPS安装:`pip install git+https://<token>@github.com/user/private-repo.git`
无效尝试
常见但无效的做法:
-
70% 失败
HTTPS authentication requires a personal access token or password, which is not set in the URL.
-
60% 失败
If SSH key is not set up, manual clone will also fail with permission denied.