1

I'm attempting to push changes with git via git push production master and it compresses the files to push and then gives me these errors in return:

Counting objects: 1861, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1808/1808), done.
fatal: unable to read 58926d52844e79d28435d8ea82bd8c7107e01a48
remote: fatal: early EOF

I'm having a hard time understanding why the compression is failing, or if that's what's happening at all.

brunam
  • 825
  • 2
  • 14
  • 26
  • It's not clear the compression is the problem. The error is `unable to read 58926d52844e79d28435d8ea82bd8c7107e01a48`. Where is the destination repository? Is it on a server you control, or on a hosted service like github/gitlab/bitbucket/etc? – larsks May 08 '18 at 19:39
  • It's hosted by WPEngine who swear the issue isn't on their end. Pushes perfectly fine to bitbucket so I suspect it's on their end. Just can't get them to understand that. – brunam May 08 '18 at 19:41
  • Have you tried some of the solutions [here](https://stackoverflow.com/questions/20870895/how-to-diagnose-and-fix-git-fatal-unable-to-read-tree) to rule out problems with your local repository? – larsks May 08 '18 at 19:50

1 Answers1

1

This is rather puzzling. If the problem were remote, I would expect to see:

remote: fatal: unable to read <hash>

but the actual output is:

fatal: unable to read <hash>

which I believe means that it's your own Git—in this case, your builtin/pack-objects.c file—that is complaining here:

        buf = read_object_file(&entry->idx.oid, &type, &size);
        if (!buf)
                die("unable to read %s", oid_to_hex(&entry->idx.oid));
        base_buf = read_object_file(&entry->delta->idx.oid, &type, &base_size);
        if (!base_buf)
                die("unable to read %s",
                    oid_to_hex(&entry->delta->idx.oid));

This could perhaps be coming from the fancy new "promise objects" code that allows partial clones to exist. See the partial clone documentation for details. Is your clone unusual in any way, e.g., shallow? (Does .git/shallow exist?) What version of Git are you running? (Promise objects and narrow clones have partial support as of Git 2.17, using the "filter" options.)

The fact that you can push to a different server is not, itself, all that important, since the delta bases your Git will use when compressing a pack file to send on git push depends on which commits their Git has. If the two servers have different sets of commits on them, your own Git may choose different delta-bases with which to build the thin pack to send to their Git.

torek
  • 448,244
  • 59
  • 642
  • 775