本文介绍了GIT拉错误 - 远程对象已损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$ git pull
remote: fatal: object 21f3981dd35fccd28febabd96f27241eea856c50 is corrupted
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header
任何想法为什么会失败? >
当我运行 git --bare fsck-objects --full
我只能看到悬挂的链接,但没有断开的链接。还有 git gc
没有任何帮助。当我reclone或从另一个克隆执行操作时,我没有看到这个错误。
Any ideas why this is failing?
When I run git --bare fsck-objects --full
I just see dangling links but no broken links. Also git gc
didn't help in any way. When I reclone or do pull from another clone, I don't see this error.
推荐答案
这确实可能是内存问题,为了确保我们不会丢失解决方案这里是:
It really can be a memory issue, and to make sure we don't lose the solution here it is:
git config --global pack.windowMemory "100m"
git config --global pack.SizeLimit "100m"
git config --global pack.threads "1"
这篇关于GIT拉错误 - 远程对象已损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!