error: RPC failed; curl 18 transfer closed with outstanding read data remaining

参考文章:https://stackoverflow.com/questions/38618885/error-rpc-failed-curl-transfer-closed-with-outstanding-read-data-remaining

Cloning into 'large-repository'...
remote: Counting objects: 20248, done.
remote: Compressing objects: 100% (10204/10204), 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值:

git config --global http.postBuffer 524288000

有时候文件过大时,还需要分两步走:

第一步:先把depth为1先clone

$ git clone http://github.com/large-repository --depth 1

第二步:进入clone下来的目录,进行unshallow

$ cd large-repository
$ git fetch --unshallow

你可能感兴趣的:(github)