解决git pull/clone 问题 fatal: The remote end hung up unexpectedly


项目文件好几个月没有拉取,文件太多太大导致以下错误

fatal: early EOF: 90% (26964/29716), 1.00 GiB | 4.69 MiB/s
fatal: The remote end hung up unexpectedly
fatal: index-pack failed

 

尝试了以下方法都不行

$ git config --global http.lowSpeedLimit 0

$ git config --global http.lowSpeedTime 999999

$ git config --global http.postBuffer 5242880

 

在下面链接找到解决方法

https://stackoverflow.com/questions/21277806/fatal-early-eof-fatal-index-pack-failed

 

1. 如果有compression配置的话先关闭

   git config --global core.compression 0

2.  先做depth=1的 clone 

   git clone --depth 1 <repo_URI>

3.   git fetch --depth=100

后面再做 git pull --all

注意

如果第三步 做 git fetch --unshallow 会出错

$ git fetch --unshallow
remote: Enumerating objects: 28152, done.
error: RPC failed; result=18, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: protocol error: bad pack header


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM