git clone 报错 early EOF 或 SSL_ERROR_SYSCALL

git clone 报错 early EOF 或 SSL_ERROR_SYSCALL

philo-尼可 307 2021-01-27

问题发生:
在clone github 上的代码时,

git clone https://github.com/wongdean/rime-settings.git

发现进度会卡住不动,

Administrator@philonic MINGW64 /g/software
$ git clone https://github.com/wongdean/rime-settings.git
Cloning into 'rime-settings'...
remote: Enumerating objects: 539, done.
Receiving objects:  36% (195/539), 50.43 MiB | 730.00 KiB/s

过几分钟就报错。

error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

然后,没有关注错误,继续 git clone, 又报其他错误了。

Administrator@philonic MINGW64 /g/software
$ git clone https://github.com/wongdean/rime-settings.git
Cloning into 'rime-settings'...
remote: Enumerating objects: 539, done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

网上搜了一下,也尝试了一些,最终下面的语句解决

git config --global core.compression 0      //关闭压缩

继续 git clone , 这次报错和第一次一样了,说明根本问题还没有解决。

Administrator@philonic MINGW64 /g/software
$ git clone https://github.com/wongdean/rime-settings.git
Cloning into 'rime-settings'...
remote: Enumerating objects: 539, done.
error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

这个报错,网上的解法很统一。

git config --global http.postBuffer  524288000

继续 git clone, 这次终于成功了。

Administrator@philonic MINGW64 /g/software
$ git clone https://github.com/wongdean/rime-settings.git
Cloning into 'rime-settings'...
remote: Enumerating objects: 539, done.
Reremote: Total 539 (delta 0), reused 0 (delta 0), pack-reused 539
Receiving objects: 100% (539/539), 99.89 MiB | 1.66 MiB/s, done.
Resolving deltas: 100% (276/276), done.
Checking out files: 100% (48/48), done.

遇到问题莫方,遇到一个解决一个。方法总比问题多。


# git # EOF #  SSL_ERROR_SYSCALL # git clone