Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git error - can't push to github - pack-objects died of signal 9

Tags:

git

github

I added some files to the repo, committed, and attempted to push to Github:

$ git add .  
$ git commit -m 'bla'  
$ git push origin master

I am getting an error when I try to push to Github.

Counting objects: 84, done.  
Delta compression using up to 2 threads.  
error: pack-objects died of signal 9  
error: failed to push some refs to '[email protected]:xxxxx/xxxxx.git'

All was working fine before I went on vacation 2 weeks ago. Nothing has changed in the interim as far as I know. The config file seems to be fine. And git push -f also generates the same errors as above.

like image 838
Michelle Williamson Avatar asked Sep 16 '13 15:09

Michelle Williamson


4 Answers

Try this:

git config --global pack.windowMemory "32m"
like image 187
asjer Avatar answered Nov 17 '22 09:11

asjer


Git repack organizes unpacked objects into packs, which are a collection of objects, individually compressed, with delta compression applied, stored in a single file, with an associated index file.

    git repack -a -d -f --window=0
  • a: pack everything into a single pack
  • d: remove any newly redundant packs
  • f: don't reused old deltas, I guess to keep memory need down
  • window=0: stops comparisons with other objects to try to save space, I guess also to keep memory need down
like image 27
hetal Avatar answered Nov 17 '22 11:11

hetal


I'm quite convinced you have a local problem and it's nothing to do with GitHub. A git push consists of the following steps:

  • local: delta compression of objects
  • net: Writing new compressed objects to remote repo via SSH
  • net: update refs in remote repo via SSH

Quite clearly, it's the first step that fails. You might be out of memory/swap?

like image 1
SzG Avatar answered Nov 17 '22 11:11

SzG


On a FreeBSD box with a lean RAM profile and a large repository with many files, I started getting this error. The /var/log/messages file contained errors like this:

pid 93208 (git), jid 0, uid 1001, was killed: out of swap space

I was able to resolve this by adding a little more swap space temporarily.

like image 1
Dave Avatar answered Nov 17 '22 10:11

Dave