2

While pushing a git repository from a ubuntu server to another ubuntu server, I get the following error:

Pushing to gitosis@xxx:yyy
Enter passphrase for key '/home/ngrislain/.ssh/id_rsa': 
Counting objects: 88, done.
Compressing objects: 100% (50/50), done.
error: inflate returned -551), 22.15 MiB | 1.13 MiB/s   
error: pack-objects died of signal 13MiB | 1.10 MiB/s   
error: failed to push some refs to 'gitosis@xxx:yyy'

My disk is not full, I still can pull... Does anyone understand this ?

Thanks,

ngrislain
  • 944
  • 12
  • 19
  • Can yo try to clone it, make a commit and push, to see if the issue wouldn't come from the local repo? Otherwise, there is some kind of corruption on the server side, as described in http://git.661346.n2.nabble.com/Massive-repository-corruptions-td5285660.html. – VonC Dec 11 '12 at 09:24

1 Answers1

2

Short answer: Your remote repository is broken.

Most objects (commits, old file contents, etc.) in a git repository are packed in .pack files. Whenever git needs to access those objects it first needs to unpack them. If the packed file is corrupt git is no longer able to access those objects and is unhappy.

Your tried to push to a remote repository, which seems to contain such a corrupt pack file. The remote end needed to unpack it, but was not able to do so. Hence it was not able to integrate your push.

You need to fix your remote repository. As git is a distributed VCS, one way to do this is just to create a new repository on the server by cloning from your own repository.

Depending on the level of detail you are interested in you may also look at the man page of git-unpack-objects or at the git source code int git_inflate(...) in zlib.c, which contains the failing call to inflate.

There is also a GitFaq on how to fix a broken repository.

michas
  • 25,361
  • 15
  • 76
  • 121