pip - pip 和私有存储库
问题描述
我正在部署一个 python 应用程序,我正在尝试使用Drone.io创建一个管道
在我的主应用程序中,我有多个位于私有 Github 存储库中的依赖项requirements.txt
:
git+ssh://git@hostname_A/org/repo_A.git
git+ssh://git@hostname_B/org/repo_B.git
对于每个存储库,我都有一个 Github Deploy Key
。所以我的.drone.yml
包含多个部署密钥存储在无人机机密中。在我的容器内,我正在复制一个.ssh/config
文件:
Host hostname_A
HostName github.com
User git
IdentityFile /root/.ssh/repo_A_rsa
Host hostname_B
HostName github.com
User git
IdentityFile /root/.ssh/repo_B_rsa
问题是存储库/包repo_B
也与私有存储库有依赖关系repo_A
。而且我不知道如何链接这个私有存储库,我试图在of中添加install_requires
和:dependency_links
setup.py
repo_B
setuptools.setup(
name="repo_B",
install_requires=[
"repo_A_alias @ git+ssh://git@hostname_A/org/repo_A.git"
],
)
但我仍然得到错误:
collecting repo_B @ git+ssh://git@github.com/org/repo_B.git
Cloning ssh://****@github.com/org/repo_B.git to /tmp/pip-install-naymvvlo/repo_B_67066986e78c4124b8cc99242aeaa673
ERROR: Command errored out with exit status 128: git clone -q 'ssh://****@github.com/org/repo_B.git' /tmp/pip-install-naymvvlo/repo_B_67066986e78c4124b8cc99242aeaa673 Check the logs for full command output.
或者有没有办法访问日志文件?