Pip 无法再从 https 克隆 - 错误 128

CL4*_*L40 14 git pip gitea

我有一个使用标准 https 克隆语法的项目已经有一段时间了,就在今天下午它运行良好。现在,我error code 128每次尝试克隆时都会得到:

Obtaining myproject from git+git://myurl/myuser/myproject.git@master#egg=myproject (from -r requirements.txt (line 28))
  ...
  fatal: unable to connect to myurl:
  myurl[0: x.y.z.q]: errno=Invalid argument

ERROR: Command errored out with exit status 128: git clone -q git://myurl/myuser/myproject.git Check the logs for full command output.
Run Code Online (Sandbox Code Playgroud)

我已经确认我可以使用手动克隆

git clone -q https://myurl/myuser/myproject.git

以及通过SSH。

我在 gitea 上托管我的存储库,但我没有发现任何与此相关的错误。这很奇怪。

有谁知道会出什么问题?我什至删除了我的 virtualenv 文件夹并在没有运气的情况下重新实例化了它,并重新启动了我的 gitea 服务器。

sin*_*roc 7

请参阅pip 安装文档。如果要使用该https协议,则语法为:

git+https://git.example.com/MyProject#egg=MyProject

但是从您的问题来看,您似乎正在使用git协议 ( git+git://git.example.com/MyProject#egg=MyProject)。所以这是一个不同的协议。

  • 请参阅相同的文档,其中还列出了“git://git.example.com/MyProject.git@master#egg=MyProject”,这是问题中发布的内容 (2认同)

Jim*_* K. 6

太长了;博士

我遇到了一个非常类似的错误,最终导致缺少用于提取 HTTPS url 的 ca-certs。解决方法是:

apt-get install -y --reinstall ca-certificates
Run Code Online (Sandbox Code Playgroud)

细节

在深入研究 pip 输出后,底层git clone -q出现了如下错误:

fatal: unable to access 'https://github.com/blah/blah.git/': server certificate verification failed. CAfile: none CRLfile: none                   
Run Code Online (Sandbox Code Playgroud)