ERROR:gitosis.serve.main:Repository read access denied fatal: The remote end hung up unexpectedly
I recently set up a gitosis git server on my Linux box. I added a new project and then found that I could no longer push to the gitosis-admin project.
If you’ve searched for a solution to this problem and you’ve tried everything you may have the same problem that I had. You have probably verified all permissions, checked the gitosis login with ssh -vvv user@host etc.
The problem is that I added stanzas for each project for a given user like:
[group gitosis-admin] writable = gitosis-admin members = me@host [group gitosis-admin] writable = project_one members = me@host [group gitosis-admin] writable = project_two members = me@host
This is wrong. It needs to be like this, with all the projects on the same line:
[group gitosis-admin] writable = gitosis-admin project_one project_two members = me@host
Hopefully this will save some of you some time. I changed this directly on the server to get it working again.