"ERROR:gitosis.serve.main:Repository read access denied" when trying to clone a git repo
Solution 1
First I would use gitolite instead. Gitosis is no longer actively developed.
Check that you need to name the public key to your user name that appears in the config. Your public key that you commit should be renamed to jobeet.pub.
Hope this helps.
Solution 2
I got the same error while I was trying push new repository. It was caused by missing rights on /var/git/repositories/gitosis-admin.git/hooks/post-update
sudo chmod a+x /var/git/repositories/gitosis-admin.git/hooks/post-update
Omid Kamangar
Updated on July 19, 2022Comments
-
Omid Kamangar almost 2 years
I have one desktop PC running Ubuntu 11.04 and one Netbook running Debian 6.0.1a. I have installed and configured git as described here, on my desktop PC.
I am also learning Symfony and have setup a repository for the Jobeet project on my PC. Now, when I try to clone the repository from Debian on my Netbook, I get this error:
ERROR:gitosis.serve.main:Repository read access denied
I have setup ssh and can easily connect to the Ubuntu from Debian with ssh.
Contents of my gitosis.conf:
[gitosis] [group symfony] writable = jobeet members = ako@ako-ubuntu-11 ako@debian [group team] writable = testproject members = ako@ako-ubuntu-11 ako@debian [group gitosis-admin] members = ako@ako-ubuntu-11 ako@debian writable = gitosis-admin
I have copied the id_rsa.pub file (public key of the Debian user) to the keydir directory too, and pushed back to the gitosis repo.
I am able to clone the repository from Ubuntu machine, so I think it has something to do with the permissions and/or ssh.
Any help is greatly appreciated.
-
Ain Tohvri about 12 yearsUnfortunately didn't resolve it in my case. Still the same error :(
-
rfay about 11 yearsI had a similar problem; the post-update was a link pointing to an obsolete version in python2.6 instead of python2.7. Resolved by changing the post-update link and fixing the permissions. Same basic question: stackoverflow.com/questions/1474515/…