Pushing local repo to bare server repo on shared host
Ok...here's the deal. When I attempt to push my local repo to my bare repo on the server, I get the following error:
Counting objects: 225, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (220/220), done.
Writing objects: 100% (225/225), 391.31 KiB, done.
Total 225 (delta 25), reused 0 (delta 0)
git: 'index-pack' is not a git-command. See 'git --help'.
error: index-pack exited with error code 1
error: unpack failed: index-pack abnormal exit
To user@ipaddress:/home/user/public_html/dir.git
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'user@ipaddress:/home/user/public_html/dir.git'
Now I only get this error message when I attempt to push my larger repo. When I push single file up to three file repos, it works flawlessly. What's up with that?!?!
Note: I'm on a shared web host, but I have SSH access to the server. If 开发者_高级运维I missed something you need, let me know and I can post the info...
Thanks for any help!
This means that git-index-pack is not found on the remote machine. Is it in your path? Try running this through the ssh command:
git --exec-path
In other words, run the following:
ssh user@hostname git --exec-path
and see if that works.
Got something similar, including the
error: unpack failed: index-pack abnormal exit
Turns out I had some weird permissions set on the shared repository on the server - group did not have write permissions to everything. A simple
chmod -R g+w <repo>
did the trick.
Also did a
chown -R :<group> <repo>
find <repo> -type d -exec chmod g+s {} \;
to make sure nothing was set to the wrong group
精彩评论