美文网首页
Git出现"error: RPC failed; curl 18

Git出现"error: RPC failed; curl 18

作者: 网络小乙 | 来源:发表于2020-07-25 16:33 被阅读0次

当使用git clone或者git pull时,有时会出现如下的错误:

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

错误的原因有以下几种:

  1. curl的postBuffer值太小,需要增加缓存
    使用git命令增大缓存(单位是b,524288000B也就500M左右)
    #增大curl缓存
    git config --global http.postBuffer 524288000
    #查看设置是否生效
    git config --list
    
  2. 网络下载速度缓慢
    git config --global http.lowSpeedLimit 0
    git config --global http.lowSpeedTime 999999
    
  3. 代码库中文件太多,可以尝试浅层clone,再更新远程库到本地
    git clone --depth=1 https://github.com/xxxxx.git
    git fetch --unshallow
    

相关文章

网友评论

      本文标题:Git出现"error: RPC failed; curl 18

      本文链接:https://www.haomeiwen.com/subject/xckmlktx.html