具有自定义路径的Pip,Git和ssh键

Rap*_*ael 5 python git ssh pip

基于以下问题(是否可以使用pip从私有github存储库安装包?),我尝试通过ssh连接到pip git存储库.

我的关键是自定义路径.我尝试导入它没有成功,总是以

Command /usr/bin/git clone -q ssh://git@bitbucket.org:<user>/<repo>.git /tmp/pip-rYrupA-build failed with error code 128 in None
Run Code Online (Sandbox Code Playgroud)

我试着登录

pip install git+ssh://git@bitbucket.org:<user>/<repo>.git -i /path/to/id_rsa 
Run Code Online (Sandbox Code Playgroud)

没有成功.谢谢!

Rap*_*ael 5

好的,找到了答案:Bitbuckets 提供了一个指向存储库的 ssh 链接,格式为

git@bitbucket.org:<user>/<repo>.git
Run Code Online (Sandbox Code Playgroud)

问题是由于“:”引起的,应该用“/”替换:

git@bitbucket.org/<user>/<repo>.git
Run Code Online (Sandbox Code Playgroud)