git push error: pack-objects died with strange error – Education Career Blog

I have been pushing to this repo successfully for some time, it started giving me the following error from no where, any ideas why it is happening?

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'

appreciate your time and help.

,

Couple of points to check out:

  • problem of disk space on the pushing side (like “out of disk space” in $GIT_DIR or $TMP_DIR ?)

  • right issues (under which account the process is executed ?)

  • Platform-specific issue: on Mac OS, you can have a MacPort configuration problem.

  • difference of version between the git on the pushing side and the one on the remote site (meaning for instance if you try to push submodules on the remote peer, with a git binary which doesn’t know about submodule, you could have some trouble like this)

Note: Since is an error message associated with the pack_object() function, so check if git pack still works.

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;
    }
}

Note-bis: there are some recent cases for this error message when pushing to GitHub (late January 2009)

,

Unfortunately, the error messages aren’t very helpful. But your problem isn’t coming from Git pack; the first error message is from OpenSSH, which was able to reach the remote server but not sign in:

Connection to SERVER closed by remote host.

This is not a password problem (which has a different error message) but could be a permissions problem (like a group that doesn’t have proper permission, which I see occasionally on OSX) or an unrecognized account name (on some systems this reports with password problems) or a timeout. You might try signing in from the command line:

$ ssh [email protected]

to discover what kind of problem you are having. You might also try repairing permissions; OS X seems particularly vulnerable to recurring permissions problems and to running from odd groups.

Sidenote — since you’re on Leopard, I suggest you install SSHKeychain, which manages SSH identities and will store your SSH passphrases in the system keychain automatically. It won’t help your current problem, but might prevent similar problems in the future.

,

If you happen to be using a code review tool such as gerrit, and you get this when you try to push code, it might be because java programs are generally awesome at memory management. And you won’t find anyone on the internet that can help you, until you, in desperation, decide to kill gerrit and restart it. And then poof, your problem goes away… until a few days later when you’ll need to restart gerrit again for the same issue.

Java is awesome.

Leave a Comment