git 推送错误 : pack-objects died with strange error

标签 git

我已经成功地推送到这个 repo 一段时间了,它不知从哪里开始给我以下错误,知道为什么会这样吗?

Ishaqs-Mac:source ishaq$ git push
Counting objects: 68, done.
Delta compression using 2 threads.
Compressing objects: 100% (50/50), done.
Connection to SERVER closed by remote host.
error: pack-objects died with strange error
error: failed to push some refs to 'SERVER:PROJECT.git'

感谢您的宝贵时间和帮助。

最佳答案

需要检查的几点:

  • 推送端的磁盘空间问题(如 $GIT_DIR 或 $TMP_DIR 中的“磁盘空间不足”?)

  • 对题(流程在哪个账号下执行?)

  • 特定于平台的问题:在 Mac OS 上,您可能有一个 MacPort configuration problem .

  • 推送端的 git 和远程站点上的 git 之间的版本差异(例如,如果您尝试将子模块推送到远程站点,使用 git 二进制文件不知道子模块,你可能会遇到这样的麻烦)

注意:因为是一个error message associated with the pack_object() function , 所以检查 git pack 是否仍然有效。

static void pack_objects(int fd, struct ref *refs)
{
    for (;;) {
        int status, code;
        pid_t waiting = waitpid(pid, &status, 0);
        if (waiting < 0) {
            if (errno == EINTR)
                continue;
            return error("waitpid failed (%s)", strerror(errno));
        }
        if ((waiting != pid) || WIFSIGNALED(status) ||
            !WIFEXITED(status))
            return error("pack-objects died with strange error");
        code = WEXITSTATUS(status);
        if (code)
            return -code;
        return 0;
    }
}

注意之二:在 pushing to GitHub 时出现此错误消息的一些最近案例(2009 年 1 月下旬)

关于git 推送错误 : pack-objects died with strange error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/718962/

相关文章:

git - 跳过处理先前已经处理过的 post-receive Hook 中的 Git 修订

git 推送被拒绝

git - 如何在gerrit上重写历史?

r - 更新使用 install_hugo() 安装的 Hugo academic 主题的最佳实践

Git 别名链添加、提交、 pull 、推送?

Git 推送 : Error: unpack failed: index-pack abnormal exit

Git 看到假想的文件(区分大小写)

git - 如何理解git format-patch手册中的 "<since>"?

git - 对 git 中的分支感到困惑

git - Jitpack无法解决存储库,401读取访问错误