error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: the remote en

git clone的时候出现了这个错误:error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly

原因1:缓存区溢出

解决办法:终端输入
$ git config http.postBuffer 524288000

原因2:网络下载缓慢

解决办法:终端输入:
$ git config --global http.lowSpeedLimit 0
$ git config --global http.lowSpeedTime 999999
如果还没解决的话,终极杀招:
浅克隆,然后更新远程到本地
$ git clone --depth=1 https://github.***/XXX/***.git
$ git fetch --unshallow

你可能感兴趣的:(git和github的学习)