我正在使用远程 git 存储库。我成功提交了我的文件,现在我正在尝试 将其推送到流。
操作失败并显示此消息:
git.exe push --progress "origin" master:master
error: unpack failed: unpack-objects abnormal exit
error: RPC failed; result=18, HTTP code = 200
我在 Windows 7 上使用 TortoiseGit 客户端。
为什么我会收到这条消息?如何从这种状态中恢复?
最佳答案
如果您的 git 存储库是自托管的,请检查远程 git 目录的文件系统权限。如果它被损坏,可能是你的 git 服务器没有权限。
例如,我在 Ubuntu 服务器上托管了自己的 gitosis 系统。当我在服务器上创建 git repo 时,我运行 sudo git init --bare <repo name>
然后我必须运行 sudo chgrp -R gitosis <repo name> && sudo chown -R gitosis <repo name>
.
关于git push failed - unpack-objects异常退出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8442695/