Git push fails with "fatal: early EOF" when PUSHing but only on one file
Asked Answered
C

3

15

When I try adding textures and text files to my repo it all works, but when I try adding a .blend file I get this error. I've tried a bunch of things I found here and on google, none of them worked (all were for clone/pull commands)

I'm using Tortoise git 1.7.8 and Git 1.7.10 msysgit - I changed to them after the latest builds failed.

Others have no problem pushing things to the repo, but I did not send them the .blend file.

Here is the output:

Pushing to ssh://[email protected]:x/home/git/gitrepo
Counting objects: 4, done.
Compressing objects: 100% (3/3)
Writing objects: 100% (3/3), 112.00 KiB | 116 KiB/s
Writing objects: 100% (3/3), 113.07 KiB | 116 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
fatal: early EOF
error: unpack failed: unpack-objects abnormal exit
To ssh://[email protected]:x/home/git/gitrepo
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'ssh://[email protected]:x/home/git/gitrepo'

EDIT: It now seems this is a server problem, since github works. I'll update if I find a solution.

Chatterbox answered 17/8, 2012 at 16:21 Comment(11)
I'd say it's a permission issue. Does the .blend file have noticably different permissions (and access permissions)?Collective
No, exactly the same. And just to be 100% - this is happening on windows, server is on freebsd.Chatterbox
Is this behavior reproducible? I.e. can you provoke the same error with ANY .blend file, and can you reproduce successfully that the push WORKS for newly added files that aren't .blend files?Collective
What you describe sounds similar to this bug: code.google.com/p/tortoisegit/issues/detail?id=1272 Worth trying with OpenSSH if it happens you too are using tortoise to do the ssh.Collective
possible duplicate: #2506144Andrus
Is the file large? Can we have a ls -lh report?Andrus
@TomKerr I checked for duplicates, and all of posts are for pull/clone not for push as in my case.Chatterbox
@Collective yes, I've reproduced this several times, it always happens the same way, after I try to push a commit with that .blend file. I pushed other things first and it worked, I have not, however pushed another .blend file. Will try that now. Edit: another file, now .md2 caused the same problem.Chatterbox
Oh, to add another comment in response to @Tom: size is 500ish KB and client runs on windows so I dont think size is a factor. I am thinking about a bug in compression when uploading, but it is wierd that a bug like that had not poped before.Chatterbox
Yea, windows has problems with files >2gb.Andrus
Well i know this is a old question but looks like if you use HTTP wont give that error so this is SSH related errorSympetalous
N
17

(This answer is a workaround, not a solution.)

I've just had the same problem (can't push my changes anymore using TortoiseGit/msysgit). Since the problem occurs during unpacking, it can be avoided by disabling compression:

  1. Context Menu on the folder/TortoiseGit/Settings
  2. "Edit local .git/config"
  3. Add compression = 0 to the [core] section.

Obviously, disabling compression might affect performance, so use this workaround at your own discretion.

Nutcracker answered 16/4, 2013 at 9:33 Comment(1)
This worked perfectly for me, with the exact same error. Once you get the push out, you can turn compression back on again because all subsequent pushes appear to work.Satori
D
8

I'm just going to add what worked for me in case someone else stumbles upon this problem.

Execute the following on the command line to make large files work when you get the above error.

git config http.postBuffer 524288000

See https://groups.google.com/forum/#!topic/gitlabhq/tNfe2POcY4E.

Debtor answered 12/9, 2016 at 13:10 Comment(1)
Thanks! I just ran into this and this solved the issue for me.Elison
S
-1

It's possible that you are overflowing the postbuffer.

The following command fixes the symptom for me:

git config http.postBuffer 524288000

See this related issue: https://mcmap.net/q/47229/-git-fails-when-pushing-commit-to-github

Scauper answered 27/3, 2018 at 9:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.