Symptom:
git push --progress -v
Pushing to git@bitbucket.org:XXX/XXX.git
Counting objects: ###, done.
Delta compression using up to 16 threads.
fatal: unable to create thread: Resource temporarily unavailable
error: pack-objects died with strange error
error: failed to push some refs to 'git@bitbucket.org:XXX/XXX.git'
What I had read suggested that this is something that can only be alleviated at the server side (and I'm using a hosted bitbucket.org Git repo). Note, this may be following a fairly substantial git commit containing 100s of files of modifications and deletions during a botched Drupal contrib modules update....
Smart man Marcus Bertrand [Atlassian] correctly pointed out that this was actually a local client (well, remote dev where I'm git-commit'ing) configuration issue. I was unable to crack the specific config to push it through (ha, get it?) but this clever workaround DID do the trick for me:
- Mash down the whole local repo for transport:
tar zcf projectgit.tgz .git
- Pull the tgz in locally to my mac.
- On local mac, untar:
tar zxf projectgit.tgz
- Not sure this next step was indeed necessary:
git repack
But it did work here whereas it did not work there!
- Push to remote repo at bitbucket.org:
git push
- Go back to the other server which suffered under some memory or other limitation and see if it worked:
git pull
I saw "Already up to date" and saw I was home free!
To confirm all was made aright again, I made a quick git commit, git push (voila!), git pull, git goin' goin', git gone!