git clone 
git clone 去拉一个大概1G的仓库,出现以下错误:  
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. 增大Buffer大小 
究其原因是因为curl的postBuffer的默认值太小,我们需要调整它的大小,在终端重新配置大小  
在这里,笔者把postBuffer的值配置成 2G。可以根据你需要下载的文件大小,将postBuffer值配置成合适的大小。  
 
 git config --global http.postBuffer 2097152000  
  
这样已经配置好了,如果你不确定,可以根据以下命令git config --list查看postBuffer。  
http.postbuffer=524288000
  
  
此方法我这里尝试过,没用!  
2. 采用SSH方法 
采用ssh方法,需要用到公钥和密钥,请先在仓库那里设置好。(我这里是阿里云的仓库,需要在阿里云这里配置到公钥,才能拉取)  查看本地是否有密钥:ls ~/.ssh 查看是否有成对的xxx,xxx.pub,这个带pub的就是公钥,复制内容粘贴即可;  
 
 如果你也是阿里云,可以参考这个说明:https://code.aliyun.com/help/ssh/README  
  
  
                
                
                
        
    
 
 |