简体   繁体   中英

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

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.

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.

如果你在中国,可能你应该为 git 设置代理,例如

git config --global https.proxy 'socks5://127.0.0.1:9999'

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM