How to prevent ssh git push to set file ownership?
- by e-satis
I have a remote bare git repository on an Ubuntu server, where the file are owned by the user my_project and the group my_project, with permissions set accordingly. All commiters are themself in the group my_project.
When somebody commit then push from my Ubuntu laptop with the user my_user to the server via SSH, some files in the remote repository are created (updated?) so they now belong to the user and group my_user.
Of course, when somebody else want to commit, he is now unable to do so because he doesn't have write permissions. I could set permission to 777 but it's not the best option.
Is there any way I can solve this problem while keeping restricted write permissions.