0
点赞
收藏
分享

微信扫一扫

fatal: early EOF fatal: index-pack failed

爱写作的小土豆 2021-09-25 阅读 92
日记本

今天装了最新macos 11.0.1,在clone项目的时候出现错误:

jianlongnie@macos repos % git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
Cloning into 'master'...
remote: Counting objects: 4584950, done.
remote: Compressing objects: 100% (1333959/1333959), done.

解决办法:

git config --add core.compression -1
git config --global  --list
http.postbuffer=524288000
core.compression=-1

但是当我重新 clone的时候,还是会出问题,最后无奈,只能分步骤clone:
关闭压缩策略:

git config --global core.compression 0

只clone最后的git文件:

git clone --depth 1 <repo_URI>

clone剩下的:

git fetch --unshallow 

或者

git fetch --depth=2147483647

最后

git pull --all
举报

相关推荐

0 条评论