简体   繁体   English

git clone: GnuTLS recv 错误 (-9): 收到了长度意外的 TLS 数据包

[英]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:我正在尝试克隆 git 存储库,但在执行命令时收到以下错误:

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

My client machine is a Ubuntu 14.04.我的客户端机器是 Ubuntu 14.04。

This is Known bug as @Ivan Ternovtsiy said ,but there is workaround这是@Ivan Ternovtsiy 所说的已知错误,但有解决方法

Remove current GIT from your system从系统中删除当前的 GIT

 sudo apt-get purge git

Download GIT deb git_1.9.1-1_amd64.deb link下载 GIT deb git_1.9.1-1_amd64.deb 链接

Execute the downloaded DEB.执行下载的 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.注意:我曾经使用我在另一个关于浅克隆的问题提到的解决方法,这让我认为更短的连接可能有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 git clone GnuTLS recv error(-9):收到意外长度的TLS数据包 - git clone GnuTLS recv error (-9): A TLS packet with unexpected length was received git clone 错误:gnutls_handshake() 失败:收到了意外的 TLS 数据包 - git clone error: gnutls_handshake() failed: An unexpected TLS packet was received Git 问题:gnutls_handshake() 失败:收到了意外的 TLS 数据包 - Git Problem: gnutls_handshake() failed: An unexpected TLS packet was received “gnutls_handshake()失败():一个意外长度的TLS数据包”在学校收到“ - “gnutls_handshake() failed(): A TLS packet with unexpected length was receive” at school Git克隆因GnuTLS错误而失败 - Git clone fails with GnuTLS error git 克隆错误:RPC 失败; curl 52 GnuTLS 接收错误 (-110) - git clone error: RPC failed; curl 52 GnuTLS recv error (-110) Git克隆产生错误的数据包长度错误 - Git clone produces bad packet length error GnuTLS recv 错误(-110):TLS 连接未正确终止 - GnuTLS recv error (-110): The TLS connection was non-properly terminated 克隆到 git 存储库时“解码收到的 TLS 数据包时出错” - "Error decoding the received TLS packet" when cloning into git repository Ubuntu git:致命:无法访问 gnutls_handshake() 失败:已收到 TLS 致命警报 - Ubuntu git: fatal: unable to access gnutls_handshake() failed: A TLS fatal alert has been received
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM