Nei*_*eil 5 python git pip github ssh-keys
我通常会使用(例如)从 Github 安装 Python 存储库:
\npip install git+git://github.com/Artory/drf-hal-json@master\nRun Code Online (Sandbox Code Playgroud)\n一致地,我的“requirements.txt”会git+git://github.com/Artory/drf-hal-json@master在其中的某个地方。
今天这个失败了。完整的回溯如下,但相关部分是:
\nThe unauthenticated git protocol on port 9418 is no longer supported.\nRun Code Online (Sandbox Code Playgroud)\n谢谢微软。回溯指向有关更新的链接。链接中的大部分页面都讨论了更新不太可能影响很多人(再次感谢微软),其余部分涉及我太菜鸟无法理解的密码学。标题为“git://”的部分简单地写着:
\n\n\n在 Git 协议方面,未加密的 git:// 不提供完整性或身份验证,使其容易被篡改。我们预计很少有人仍在使用此协议,特别是考虑到您可以推送(它在 GitHub 上为只读)。我们\xe2\x80\x99 将禁用对此协议的支持。
\n
这并不能帮助我了解如何更新我的requirements.txt以使其再次工作。您能告诉我如何更新我的requirements.txt以使其再次工作吗?完整回溯如下:
\n(venv) neil~/Documents/Code/web_app$ pip install git+git://github.com/Artory/drf-hal-json@master\nCollecting git+git://github.com/Artory/drf-hal-json@master\n Cloning git://github.com/Artory/drf-hal-json (to revision master) to /tmp/pip-req-build-zowfe130\n Running command git clone -q git://github.com/Artory/drf-hal-json /tmp/pip-req-build-zowfe130\n fatal: remote error:\n The unauthenticated git protocol on port 9418 is no longer supported.\n Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.\nWARNING: Discarding git+git://github.com/Artory/drf-hal-json@master. Command errored out with exit status 128: git clone -q git://github.com/Artory/drf-hal-json /tmp/pip-req-build-zowfe130 Check the logs for full command output.\nERROR: Command errored out with exit status 128: git clone -q git://github.com/Artory/drf-hal-json /tmp/pip-req-build-zowfe130 Check the logs for full command output.\nWARNING: You are using pip version 21.2.4; however, version 22.0.4 is available.\nYou should consider upgrading via the \'/home/neil/Documents/Code/web_app/venv/bin/python -m pip install --upgrade pip\' command.\nRun Code Online (Sandbox Code Playgroud)\n
在您提供给 的 URL 中pip,表示通过未经身份验证的协议git+git(第二个)访问 Git 存储库(第一个)。假设您想继续在此处使用匿名访问,您可以简单地重写要使用的命令,该命令通过安全的 HTTPS 协议访问 Git 存储库。gitgitgitgit+https
所以你的命令看起来像这样:
$ pip install git+https://github.com/Artory/drf-hal-json@master
Run Code Online (Sandbox Code Playgroud)
我刚刚在虚拟机中进行了测试,这似乎有效。如果您还有其他此类 URL,则以相同的方式更改应该会有效。
| 归档时间: |
|
| 查看次数: |
5430 次 |
| 最近记录: |