GIT pull error - 远程对象已损坏

标签 git git-pull git-fetch

$ 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/

相关文章:

git - git 裸存储库中的 "fetch --all"不会将本地分支同步到远程分支

git - 怕 git commit 和 push 会不小心覆盖改动

MacOS终端: how to use a seccond ssh key?

.net - git中的web.config和app.config机器特定设置

Git pull 中止自身,本地文件更改将被 merge 覆盖

GIT Pull 不通过 ssh 响应

Git: `git fetch` 报告的数字是什么意思?

git - 如何让 Git 暂时忽略 ~/.gitconfig?

image - 网站图像文件应该包含在 GIT 存储库中吗?

mysql - pull/子模块更新的 Git 通知