我正在嘗試將一個包添加到我的requirements.txt文件中:來自私人 GitHub 倉庫我是私人回購的成員我已經(jīng)ssh為私人回購配置來自另外一個分支master,其名稱中有一個斜杠使用ssh協(xié)議在整個互聯(lián)網(wǎng)上,都有關(guān)于這個話題的問題。以下是關(guān)于此的pip文檔:pip install -e "vcs+protocol://repo_url/#egg=pkg&subdirectory=pkg_dir"以及來自如何在 requirements.txt 中聲明直接 github 源的GitHub 的答案git+git://github.com/path/to/package-two@master#egg=package-two嘗試方法#1我試圖在我的requirements.txt文件中使用這個答案:-e git+ssh://github.com/Organization/repo-name.git@branch/name#egg=foo我收到一個錯誤:ERROR: Command errored out with exit status 128: git clone -q ssh://github.com/Organization/repo-name.git /path/to/venv/src/foo Check the logs for full command output.嘗試方法#2我嘗試的另一種方式requirements.txt:-e git+git@github.com:Organization/repo-name.git#egg=foo這里的克隆確實有效!它還打印此警告:DEPRECATION: This form of VCS requirement is being deprecated不幸的是,我無法弄清楚如何以這種格式指定分支名稱。我究竟做錯了什么?我錯過了什么嗎?僅供參考,我的版本:Python==3.8.5pip==20.2setuptools==47.1.0
添加回答
舉報
0/150
提交
取消