I have a shared git repository with which we had the problem that pushing led to the error message "insufficient permission for adding an object to repository database ./objects"
I have already read about the solution here: Error pushing to GitHub - insufficient permission for adding an object to repository database and here: Making git push respect permissions? and searched the web for other solutions or similar problems, without success. The repository was not configured with sharedRepository = 0660, but now it is. I also tried "group", "true" and "all" but they did not fix the problem either.
When I do a git push to the remote repository it still creates files with access rights of "-r--r-----". For example the file ./objects/0f/87b18a145ebd187cc1e5bed9f6ea90901bc207 for which ls -l puts out:
-r--r----- 1 rcosta project 166 2012-07-04 20:25 87b18a145ebd187cc1e5bed9f6ea90901bc207
The git config is:
[core]
repositoryformatversion = 0
filemode = true
bare = true
sharedRepository = 0660
I've reset file permissions using chmod -R g+ws *
. I've also done this for all other users that access the project. I am no admin on the system, so each of them logged in and I executed the command. All users belong to the project
group.
We access the repository via SSH. Each member's repository has been cloned by executing the command line:
git clone username@uni-server.de:/path/to/projectname.git
I am clueless on how to fix the problem. All files should have read and write permissions for all users of the "project" group, so that everybody can change and push any file.
Thanks for any help!
Robert.