項目文件好幾個月沒有拉取,文件太多太大導致以下錯誤
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