Remote rejected error with git

I'm trying to get a git public repository installed on server and can't seem to push an update.
I have my server local user with ssh access and file transfers seem to go fine. I have git 1.6.0.4 installed on both development iMac PPC (10.5.5) and server Intel (10.5.5). I included git-shell path in /etc/shells and /etc/shells.personal.

The public repository was deposited on an external drive with scp and everything looks good. Permissions to the files are in place. Following git installation to /usr/local, I added /usr/local/libexec/git-core to the $PATH variable.
I even chmoded the hooks files for execution.

However, when I make a change on the development side and then commit, followed by a push to the server side I get

"Compressing 3 objects. Done
Writing 5 objects. Done
Output:

Counting objects: 9, done.
Total 5 (delta 3), reused 3 (delta 2)
fatal: exec unpack-objects failed.
error: unpack failed: unpacker exited with error code
To server:/Volumes/dir.git
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'server:/Volumes/dir.git'"

All my google efforts produced linux type solutions. I did add a report back hook for update but I don't see any response.
Console secure log indicates the ssh publickey is accepted and file transfer seems to go through.
My guess is that git-unpack-objects is not called.
I tried git gc and git fsck to cleanup any residual files and received no errors.
On initial transfer of the public repository and subsequent push I received an "Everything is up to date". It's the push following a new commit that hangs.

Any advice from someone running git on server?
TIA,
Harry

mini 1.83 core 2 duo 2GB RAM + 500GB ext drive, Mac OS X (10.5.1), iMac G5, PB G4 (3)

Posted on Nov 23, 2008 10:16 PM

Reply
1 reply

Nov 24, 2008 3:51 PM in response to harry-pmsi

I went back to a package install of git-1.5.4.5 on my ppc iMac and git-1.6.0.4 on Leopard server. Still not much luck.
After re-examining permissions and setting paths, I finally got a push to work using Paul Johnston's approach at

http://marc.info/?l=git&m=122101378608279&w=2

# Fix it with symlinks in /usr/bin
server:~ $ cd /usr/bin/
server:/usr/bin $ sudo ln -s /usr/local/git/bin/git* .

I don't understand why I need the symlink is needed unless the ssh connection doesn't allow execution from a path location other than /usr/bin or /usr/sbin.
Once the symlink was installed for each of the git directory components then the push executed fine. I did use the +master:master to get a non fast-forward.
Not sure if that is still required but the connection worked.
Hope this helps someone in addition to me.
Harry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Remote rejected error with git

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.