error: RPC failed; curl 56 SSL errno 10054,curl 18 transfer closed with outstanding read data remain

git clone /git pull 失败报错如下:

$ git clone -b stable https://github.com/flutter/flutter.git
Cloning into 'flutter'...
remote: Enumerating objects: 24, done.
remote: Counting objects: 100% (24/24), done.
remote: Compressing objects: 100% (16/16), done.
Receiving objects:  25% (64236/253129), 43.24 MiB | 29.00 KiB/s
error: RPC failed; curl 56 SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

尝试用下面命令解决:

#关闭sslVerify 
git config  --global   http.sslVerify "false"

还是报错
添加命令:

#修改sslVersion 版本
git config --global http.sslVersion tlsv1.2

还是报错
将sslVerify 修改回来:

#改回来
git config  --global   http.sslVerify "true"

任然报错

添加修改缓存大小

#修改postBuffer 缓存大小为500M
git config --global http.postBuffer 524288000

报错信息变成

#由于之前git clone .git 下载下来了,现在使用git pull
$ git pull
remote: Enumerating objects: 252323, 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

继续改大缓存:

#修改postBuffer 缓存大小为1G
$ git config --global http.postBuffer 1048576000

还是报错
删除仓库,改为git clone:
还是报第一次的错

我需要冷静一下……

  • 删除之前的其他配置(如http.sslVerify,http.sslVersion),再尝试一遍(还是报错,不知道咋回事)
  • 直接去github下载zip(下载贼慢)

之前家里的一台电脑是可以git pull下来的,只修改了缓存,公司渣渣网络。
最后我是找了个镜像git clone -b stable https://github.com/flutter/flutter.git

你可能感兴趣的:(Git)