git clone: GnuTLS recv 错误 (-9): 收到了长度意外的 TLS 数据包
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31044234/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
git clone: GnuTLS recv error (-9): A TLS packet with unexpected length was received
提问by Amith Jayasekara
I'm trying to clone a git repository and I'm receiving following error while executing the command:
我正在尝试克隆 git 存储库,但在执行命令时收到以下错误:
GnuTLS recv error (-9): A TLS packet with unexpected length was received.
My client machine is a Ubuntu 14.04.
我的客户端机器是 Ubuntu 14.04。
回答by Eranga Kodikara
回答by iamdsy
If you are in china,may be you should set proxy for git,for example
如果你在 CN ,可能你应该为 git 设置代理,例如
git config --global https.proxy 'socks5://127.0.0.1:9999'
回答by hsandt
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 andpick a higher bandwidth. It's working fine now. I'm not sure if only changing provider orpicking 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 questionwhich is about shallow cloning, and that made me think that shorter connections may work.