“ERROR:gitosis.serve.main:Repository read access denied” when trying to clone a git repo

帅比萌擦擦* 提交于 2019-12-20 12:38:10

问题


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.


回答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.




回答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



回答3:


This frequently gets (1, 2, 3, and myself) resolved by re-generating the ssh keypair

ssh-keygen -t rsa

and adding it at the redmine account settings.



来源:https://stackoverflow.com/questions/6139324/errorgitosis-serve-mainrepository-read-access-denied-when-trying-to-clone-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!