【问题标题】:Pip, Git and ssh key with custom path带有自定义路径的 Pip、Git 和 ssh 密钥
【发布时间】:2015-07-30 01:28:29
【问题描述】:

基于以下问题 (Is it possible to use pip to install a package from a private github repository?),我尝试通过 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

我尝试登录

pip install git+ssh://git@bitbucket.org:<user>/<repo>.git -i /path/to/id_rsa 

没有成功。谢谢!

【问题讨论】:

    标签: python git ssh pip


    【解决方案1】:

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

    git@bitbucket.org:<user>/<repo>.git
    

    问题是由于“:”,应该替换为“/”:

    git@bitbucket.org/<user>/<repo>.git
    

    【讨论】:

      猜你喜欢
      • 2011-07-16
      • 1970-01-01
      • 1970-01-01
      • 2017-08-09
      • 2016-05-01
      • 2020-02-15
      • 2015-09-11
      • 1970-01-01
      • 2017-04-27
      相关资源
      最近更新 更多