Cyg*_*985 4 python git ssh pip pipenv
我想通过Pipenv或pip + virtualenv从私有的,通过ssh访问的远程存储库中安装软件包。克隆有效时:
git clone git@remoteurl:username/package.git
Run Code Online (Sandbox Code Playgroud)
直接安装不会:
pip install git+ssh://git@remoteurl:username/package.git
Run Code Online (Sandbox Code Playgroud)
并输出以下错误:
ssh: Could not resolve hostname remoteurl:username: Name or service not known
fatal: Could not read from remote repository.
Run Code Online (Sandbox Code Playgroud)
我尝试了pip + virtualenv和pipenv,但均无效。我还尝试了以下几种url变体:
pip install git@remoteurl:username/package.git
pip install git+git@remoteurl:username/package.git
pip install git+remoteurl:username/package.git
pip install git+ssh://remoteurl:username/package.git
Run Code Online (Sandbox Code Playgroud)
它们都产生与上面给出的相同的错误。我在这里做错了什么?
ssh:// git @ remoteurl:用户名/package.git
这是那种URL的错误语法。
Git理解SSH URL的两种语法:
user@host:path/to/repo.gitssh://user@host/path/to/repo.git因此,请尝试:
$ pip install git+ssh://git@remoteurl/username/package.git
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
609 次 |
| 最近记录: |