4

When cloning certain repositories, I am getting this error: RPC failed; curl 56 GnuTLS recv error (-110): The TLS connection was non-properly terminated.. Obviously I'm not the only one with this kind of error and I started googling for some answers. Every solution that I found and applied to my machine did not yield any results so I'm desperate enough to start a stackoverflow question.

There are repositories that I can download without any errors, so the root of the problem is dependent on certain properties of repositories. The challenge lies in how to find the responsible property.

Many thanks in advance for any suggestions.

4
  • I also have this issue. Were you able to reolve it and how ? Commented Sep 20, 2022 at 12:08
  • @DataBach wow, this was 2 3/4 years ago so I can't really remember the specifics. I think I solved it using the github cli cli.github.com but I'm not sure. I never found the reason why some repos allowed cloning and others didn't. Commented Sep 20, 2022 at 13:09
  • 1
    Hmm yeah this is a really annoying bug. I hope I will find a solution soon- it really hinders me from working. Oh next time you should answer your question right away if you find a solution, people might give you points if it was helpful ;) Cheers Commented Sep 20, 2022 at 15:20
  • 1
    @DataBach I would if I still knew the answer to it haha Commented Sep 20, 2022 at 16:00

1 Answer 1

1

I solved it in the end by recompiling and reinstalling git. I am using VSCode and WSL1 20.4 and used these commands:

sudo apt remove git -y
sudo apt update && sudo apt upgrade

DEBIAN_FRONTEND=noninteractive

sudo apt install build-essential autoconf dh-autoreconf libcurl4-openssl-dev \
                 tcl-dev gettext asciidoc docbook2x install-info \
                 libexpat1-dev libz-dev -y

wget https://raw.githubusercontent.com/paul-nelson-baker/git-openssl-shellscript/master/compile-git-with-openssl.sh .

bash compile-git-with-openssl.sh -skiptests

The commands were provided by this source. Recompiling the git takes a lot of time, especially when doing all the tests (you can removed skiptests to see if everything is ok). Unfortunatly I do not know what caused the problem, possibly conflict between GnuTls and Openssl ? Hope this answers saves the next person a headache.

Update: This error occured again for another repo just after a few days. The cause for it are some large binary files that Git does not manage to clone. Likely this is due to an unstable connection.

Also make sure you have the most recent version of git. In the Microsoft documentation it says the git version should be newer than 2.8. However, if you use f.e 2.37 the error will occur.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.