2

I ran into a very weird problem trying to put an existing local repository onto my server for sharing. I followed this tutorial: http://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server Locally, I use Git Extensions (on Windows) with Putty, specifying the remote as git@my_server.com.

However, when I try to push my local repository I get:

error: insufficient permission for adding an object to repository database ./objects

I logged into the server as user "git", went to the repository checked for problems. All file permissions were correct (belonging to git) and I can create new files. Trying to find out what went wrong I looked at the system auth log:

Feb 11 07:35:45 MY_SERVER sshd[22334]: pam_unix(sshd:session): session opened for user my_user by (uid=0)
Feb 11 07:35:47 MY_SERVER sshd[22334]: pam_unix(sshd:session): session closed for user my_user

So it looks like Git Extensions is trying to use a different user (my_user) to log into the system and then has some problem with permissions. This is even persistent when I generate a new private key for git and use this key for authentication, so it should not even be able to log is as my_user.

Now I often use my_user with Putty, but don't see how it could end up being used by Git Extensions. Furthemore, git and my_user are in the same group and the repository is shared among the group members (git config core.sharedRepository), so this should not even be a problem. I also don't understand how git can log in as my_user. I have used my_users private key in the beginning, but then replaced it. So Git Extensions must have the old settings stored somewhere. I tried to unset the credential helper (Win Store" but that didn't change anything.

If you have any idea what is going wrong, please let me know.

Makx
  • 335
  • 3
  • 11
  • possible duplicate of [Git Push Error: insufficient permission for adding an object to repository database](http://stackoverflow.com/questions/6448242/git-push-error-insufficient-permission-for-adding-an-object-to-repository-datab) – Makoto Feb 11 '15 at 07:24
  • Thanks! But as I wrote: I have set BOTH the file permissions correctly (and tested it) AND set `git config core.sharedRepository`. So this issue is different. – Makx Feb 11 '15 at 07:29

0 Answers0