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

1. 最近用git pull几个大项目,总是出现如下错误:

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

2. 按照网上的方法,还是存在问题。

// 配置代理
git config --global http.proxy socks5://127.0.0.1:1081
git config --global https.proxy socks5://127.0.0.1:1081
// 增大缓存
git config --global http.postBuffer 1048576000

3. 最终增加如下操作,解决问题。

// 把这个值改大点,完美解决,默认的是1500.
ifconfig eth0 mtu 14000
posted @ 2020-11-14 18:04  janbar  阅读(14241)  评论(0编辑  收藏  举报