11

I'm trying to clone a git repository and I'm receiving following error while executing the command:

GnuTLS recv error (-9): A TLS packet with unexpected length was received.

My client machine is a Ubuntu 14.04.

sebix
  • 2,714
  • 2
  • 27
  • 38
Amith Jayasekara
  • 363
  • 1
  • 3
  • 10

3 Answers3

2

This is Known bug as @Ivan Ternovtsiy said ,but there is workaround

Remove current GIT from your system

 sudo apt-get purge git

Download GIT deb git_1.9.1-1_amd64.deb link

Execute the downloaded DEB.

Eranga Kodikara
  • 308
  • 5
  • 25
2

If you are in china,may be you should set proxy for git,for example

git config --global https.proxy 'socks5://127.0.0.1:9999'
iamdsy
  • 61
  • 2
1

Your mileage may vary, but in my case I was suspecting two factors:

  • low download speed -> connection too long on big repository
  • my Internet provider doesn't like long connections and closes them

So I decided to change Internet provider and pick a higher bandwidth. It's working fine now. I'm not sure if only changing provider or picking a higher bandwidth would have been enough, so you'd have to try out.

Note: I used to use a workaround I mentioned in another question which is about shallow cloning, and that made me think that shorter connections may work.

hsandt
  • 670
  • 7
  • 12