20

我有一个项目使用标准的 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.

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

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

以及通过 SSH。

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

有谁知道可能出了什么问题?我什至删除了我的 virtualenv 文件夹并重新实例化它,但没有成功,还重新启动了我的 gitea 服务器。

4

4 回答 4

9

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

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

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

于 2019-10-17T07:53:11.437 回答
5

tl;博士

我有一个非常相似的错误,最终丢失了用于提取 HTTPS url 的 ca-certs。解决方法是:

apt-get install -y --reinstall ca-certificates

细节

在深入挖掘点输出后,底层git clone -q错误如下:

fatal: unable to access 'https://github.com/blah/blah.git/': server certificate verification failed. CAfile: none CRLfile: none                   
于 2020-10-14T22:36:39.773 回答
1

更改文件中的代码。

原始代码是:

pip install git+https://github.com/snkas/exputilpy.git@v1.6 | | exit 1
pip install git+https://github.com/snkas/networkload.git@v1.3 | | exit 1

改成:

pip install git+git://github.com/snkas/exputilpy.git@v1.6 | | exit 1
pip install git+git://github.com/snkas/networkload.git@v1.3 | | exit 1
于 2021-07-13T01:51:57.020 回答
0

我遇到了同样的错误,只在我的个人资料设置中添加了 ssh 的公钥 -> 密钥 ssh 并准备好了!

注意:我为 python 项目安装了这种格式的 repo

pipenv install -e git+ssh://git.example.com/MyProject.git@master#egg=MyProject
于 2020-11-04T16:20:51.830 回答