Reputation: 2626
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.
Upvotes: 42
Views: 33065
Reputation: 4988
I got this error because I had missed initializing git LFS
by running the command - git lfs install
(which required apt git-lfs
).
So if you have files > 10 MB, and you try pushing without initializing git LFS and tracking those files by LFS - you may encounter such indirect error message.
Upvotes: 0
Reputation: 2028
Is there anything in your ~/.git-support/hooks/
directory, or in the .git/hooks
directory of your repo? In particular, file named pre-push
?
If so, maybe you are seeing an error from something running during a pre-push Git hook. Experiment with renaming the file so that it does not execute. Restart your terminal and try committing again.
Upvotes: 0
Reputation: 861
Try this:
git config --global pack.windowMemory "32m"
pack.windowMemory::
The maximum size of memory that is consumed by each thread
in linkgit:git-pack-objects[1] for pack window memory when
no limit is given on the command line. The value can be
suffixed with "k", "m", or "g". When left unconfigured (or
set explicitly to 0), there will be no limit.
Upvotes: 76
Reputation: 399
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
Upvotes: 20
Reputation: 473
Please check the RAM usages, or create more space for swapfile
Upvotes: 0
Reputation: 1
In my case it was because the number of files that I wanted to add exceeded 100. If this is your problem you might want to push them in different commits.
Another explanation is that the files you want to push are too large.
Upvotes: 0
Reputation: 822
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.
Upvotes: 3
Reputation: 63
Had this problem pushing to Gitlab
.
Fixed it by adding .*
to my .gitignore
i.e. ignored all files/folders e.g. .git
beginning with .
Upvotes: -9
Reputation: 12619
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:
Quite clearly, it's the first step that fails. You might be out of memory/swap?
Upvotes: 1