$ 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
也没有任何帮助。当我重新克隆或从另一个克隆中提取时,我没有看到此错误。
最佳答案
正如 Julian 所说,请参阅 https://confluence.atlassian.com/display/FISHKB/Git+indexing+fails+due+to+bad+pack+header
这确实可能是内存问题,为了确保我们不会在这里丢失解决方案,它是:
git config --global pack.windowMemory "100m"
git config --global pack.SizeLimit "100m"
git config --global pack.threads "1"
关于GIT pull error - 远程对象已损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4170317/