21

I'm able to pull but Unable to git push

$ git push -u origin master
Counting objects: 2031, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1367/1367), done.
remote: fatal: early EOF
Writing objects: 100% (2031/2031), 34.33 MiB | 100.00 KiB/s, done.
Total 2031 (delta 659), reused 1056 (delta 324)
error: unpack failed: index-pack abnormal exit
To https://*********.git
 ! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'https://*********

I have tried :

  • git repack
  • git git config --global core.compression 0

I have already referred to the following links but nothing is working for me

Git push failed - unpack-objects abnormal exit

fatal: early EOF fatal: index-pack failed

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

Other git users are able to push to the same repo, usually this problem occurs when in commit large no of new files are added

None of the above solutions have helped and I'm stuck.

Thanks

EDIT

Also tried

[core] 
packedGitLimit = 512m 
packedGitWindowSize = 512m 
[pack] 
deltaCacheSize = 2047m 
packSizeLimit = 2047m 
windowMemory = 2047m
Community
  • 1
  • 1
Rachita Nanda
  • 4,509
  • 9
  • 42
  • 66
  • Do you have enough space on your device ? Source : http://stackoverflow.com/a/23978298/2394026 – Flows Sep 07 '16 at 06:57

8 Answers8

21

Try using the --no-thin option of git push.

$ git push --no-thin

From https://git-scm.com/docs/git-push:

--[no-]thin

These options are passed to git-send-pack[1]. A thin transfer significantly reduces the amount of sent data when the sender and receiver share many of the same objects in common. The default is --thin.

Our team has struggled with this same issue and has tried all of the fixes/workarounds mentioned in the OP links, with various success. What works for some didn't work for others, nor would it work for the same person a few months later. So far, the --no-thin option has been working well.

Phil Brown
  • 361
  • 1
  • 7
3

Maybe the entire folder permissions are not set,chown -R git:git /your path

Meter Xu
  • 31
  • 3
1

The problem comes from the version of NFS your Vagrant NFS mount. You have to use version 4 which is not available in Windows. Use temporarily default synced folders on Windows instead of NFS.

oussaka
  • 930
  • 9
  • 11
1

Unpacker error means the owner of remote directory is not compatible with current user that git use its permission not set correct. It usually helps:

 sudo chown -R yourOwner:yourOwner yourgitDirectory
akbar
  • 625
  • 6
  • 12
0

If you are the git administrator, connect on the server hosting the git repository. There, go into objects folder. There should have folder with root owner, which is your problem.

Change folder owner to be equal to other on the folder (not root).

Flows
  • 3,675
  • 3
  • 28
  • 52
  • I'm not the git administrator , other git users are able to push to the same repo, usually this problem occurs when in commit large no of files are added – Rachita Nanda Sep 07 '16 at 06:52
  • Ok. I knew this issue with root rights but not with number of files. Sorry. You can split your commit to work around the issue – Flows Sep 07 '16 at 06:54
0

I would like to add one more possible source of error. If you run your git server on some small memory device, it is very likely for it to run out of memory during unpacking large files.

If you encounter this error, you might want to use dmesg command on linux to see if you have something similar to this:

Out of memory: Killed process 102198 (git) total-vm:344988kB, anon-rss:231720kB, file-rss:0kB, shmem-rss:0kB, UID:1001 pgtables:516kB oom_score_adj:0

If you do have this out of memory situation, you probably need consider setup a large swap file for git server.

Lywx
  • 395
  • 5
  • 10
0

In my case, I was on a shared hosting, I just asked my hosting company to reset my "Number Of Processes" which wast about 90% full and it worked for me. Maybe this might help somebody

0

This Works for me totally fine, git push --no-thin alone was giving the same error.

git gc 
git push --no-thin
Alok
  • 881
  • 1
  • 11
  • 18