I have currently set up an ubuntu-server with gitolite and it works like a charm for the most parts. The only issue was when I downloaded and setup a web-gui (gitlist), to share my repositories. Im short the problem is that everytime I push up some updates the file permissions for some reference-files in the repository has their file-permissions changed and apache cant access them (and thus, the web-gui wont get access to the repository).
When I installed it I did the following steps:
- Created a user git and setup the repositorys on this user
- Added www-data user to the git-group with usermod -a -G git www-data
- Made sure git was the group for the repositories: sudo chgrp -R git repositories/
- chmod the folders to give access for all users in the group: sudo chmod ug+s repositories/
As soon as I do a push with git the file permission for 2-3 files are changed (for instance the '/repository/[name]/refs/head/master' file) and it is set to -rw-------, and only the git-user got access to the file. No other users can read or write here.
I would like that those files would stay with the given permission (for instance chmod 755) after I do a git push, so I dont need to update the permissions every time someone dos a push.