Git Pull and Clone From HostGator Fails
I’m working a small drupal site, and I’m trying to pull and push changes from my local Windows box to a remote shared hosting account on HostGator (linux). I have installed the git bash on my machine, and setup passwordless login within the Git Bash. That seems to work fine.
Here’s my command:
git clone "ssh://email@example.com/~/public_html/.git"
Here’s the complete response:
Cloning into public_html... error: git upload-pack: git-pack-objects died with error. remote: Counting objects: 3330, done.fatal: git upload-pack: aborting due to possible repository corruption on the remote side. remote: fatal: unable to create thread: Resource temporarily unavailable remote: aborting due to possible repository corruption on the remote side. fatal: early EOF fatal: index-pack failed
Here’s what I’ve tried:
ssh domain.com Last login: Mon Jan 23 14:38:07 2012 from xxxx [firstname.lastname@example.org]$ cd public_html [email@example.com]$ git fsck [firstname.lastname@example.org]$
I’ve also tried deleting the local and remote git repos, doing another git init and commiting everything fresh. I still get the same error when trying to clone the repo to my machine.
Why can’t I clone (or pull) from the remote site? How do I fix this issue?
2 Solutions collect form web for “Git Pull and Clone From HostGator Fails”
StackExchange eventually taught me that git ran out of memory. (sorry I lost the original answer!). I was able it to fix the error by sshing to the remote machine and running these commands:
git config --global pack.windowMemory "100m" git config --global pack.SizeLimit "100m" git config --global pack.threads "1"
This does seem to slow down git, but at least it works on my shared hosting account! I think that the key is the threads bit, but I’m not sure.
You might want to take a loot at url1 and url2