标签归档:error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received.

error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received.

今天在复制一个代码库的时候报错。

error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

系统使用的是 Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-111-generic x86_64)

解决办法。

$ sudo apt-get purge git
$ sudo apt-get install git

问题解决。

更新,以上似乎不能根治,下次还会出现。

实际上,由于git默认缓存大小不足导致的。
解决方法是:使用下面的命令增加缓存大小。

git config –global http.postBuffer 2000000000