I'm using a Ubuntu box to host my bare Git repositories for developers to work off.
At the moment I'm creating a user account for each developer on the box because it doubles as a filestore and local testing server.
When somebody pushes to the bare repository other developers are unable to work on the files which change in the objects folder as a result. The new files are created with the user of the developer who pushes.
I have placed all the developers into a dev group but the umask doesn't allow the group to edit.
I've never had to set up a Git repository so haven't had experience in working with the permissions. I do want each developer to have their own user account on the test server, and I would prefer them to do actions on the server using that account. I don't mind giving them sudo rights.
Is setting the umask for each developer the way forward?
While "How do I share a Git repository with multiple users on a machine?" does address your issue (and involves setting
umask
for the users), I prefer adding to my git installation an authorization layer like gitolite (see its documentation).git
' user.umask
for newly created (and gitolite-managed) Git repos: "Settingumask
in Git / Gitolite"Make a common group, e.g.
gitusers
and add all developers to this group.You might need to change permissions recursively, e.g.:
Now all your developers should have write access to the repository.