27

I have had a project working with the standard https cloning syntax for a while, and just this afternoon it was working fine. Now, I get error code 128 every time I try to clone:

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.

I have confirmed I am able to manually clone using

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

As well as through SSH.

I am hosting my repositories on gitea, and I haven't found any errors related to this. This is very strange.

Does anyone know what could be going wrong? I even deleted my virtualenv folder and re-instantiated it with no luck, as well as restart my gitea server.

CL40
  • 579
  • 1
  • 5
  • 12

5 Answers5

9

See the pip install doc. If you want to use the https protocol then the syntax is:

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

But from your question it looks like you are using the git protocol instead (git+git://git.example.com/MyProject#egg=MyProject). So this is a different protocol.

sinoroc
  • 18,409
  • 2
  • 39
  • 70
  • 2
    see the same docs, which also lists `git://git.example.com/MyProject.git@master#egg=MyProject`, which is what is posted in the question – FlyingTeller Oct 17 '19 at 10:50
6

tl;dr

I had a very similar error, which ended up being missing ca-certs for pulling HTTPS urls. The fix was to:

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

Details

After digging a little deeper into the pip output, the underlying git clone -q was erroring out like so:

fatal: unable to access 'https://github.com/blah/blah.git/': server certificate verification failed. CAfile: none CRLfile: none                   
Jim K.
  • 924
  • 8
  • 8
1

Change the code in the file.

The original code is:

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

Change to:

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
buddemat
  • 4,552
  • 14
  • 29
  • 49
custCJ
  • 11
  • 1
1

I had the same problem turns out I seated proxy for git and forgot to open the proxy app you can check your git proxy with this

 git config --global https.proxy

and you can remove it with this

 git config --global https.proxy ""
0

I had a same error and only add public key of ssh in my profile settings -> keys ssh and ready!

Note: I installed the repo with this format for python project

pipenv install -e git+ssh://git.example.com/MyProject.git@master#egg=MyProject
pedro.caicedo.dev
  • 2,269
  • 2
  • 16
  • 19