We have the problem that newly created git-repositories do not have the correct user permissions. When we create a new repositiory and try to push the first commit, we get an error like this:
git push Counting objects: 4, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 455 bytes | 455.00 KiB/s, done. Total 4 (delta 0), reused 0 (delta 0) remote: error: insufficient permission for adding an object to repository database ./objects remote: fatal: failed to write object error: remote unpack failed: unpack-objects abnormal exit To https://phab.our-domain.local/diffusion/TEST/test.git ! [remote rejected] master -> master (unpacker error) error: failed to push some refs to 'https://phab.our-domain.local/diffusion/TEST/test.git' zsh: exit 1
If we change the permissions like this
sudo chown phab:www-data /var/repo/ -R && sudo chmod g+sw /var/repo/ -R
everything works fine. But we do not want to do this everytime someone of the team creates a new git repository. Is there a way that the permissions are set correctly automatilcally?
I already found the follwing:
- a similar problem here, which was solved by an update of phabricator on feburary 22nd (but we updated phabricator last on September 1st.)
- a bug here, which is not fixed
- the idea to solve this with a git Hook
Does anyone know hot to configure pabricator correctly, so the problem above does not occur?
Any help is appreciated!
Thanks in advance!