“错误:gitosis.serve.main:存储库读取访问被拒绝”当尝试克隆 git 存储库时
我有一台运行 Ubuntu 11.04 的台式电脑和一台运行 Debian 6.0.1a 的上网本。我已按照此处所述在我的台式电脑上安装并配置了 git。
我也在学习 Symfony,并在我的 PC 上为 Jobeet 项目设置了一个存储库。 现在,当我尝试在我的上网本上从 Debian 克隆存储库时,我收到此错误:
ERROR:gitosis.serve.main:Repository read access denied
我已经设置了 ssh,并且可以使用 ssh 轻松从 Debian 连接到 Ubuntu。
我的 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
我也将 id_rsa.pub 文件(Debian 用户的公钥)复制到 keydir 目录,并推回到 gitosis 存储库。
我能够从 Ubuntu 机器克隆存储库,所以我认为它与权限和/或 ssh 有关。
非常感谢任何帮助。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
首先我会用 gitolite 代替。 Gitosis 不再活跃发展。
检查您是否需要将公钥命名为配置中显示的用户名。您提交的公钥应重命名为 jobeet.pub。
希望这有帮助。
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.
当我尝试推送新存储库时,我遇到了同样的错误。这是由于 /var/git/repositories/gitosis-admin.git/hooks/post-update 缺少权限造成的
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
这经常得到 (1, 2、3 和我自己)通过重新生成 ssh 密钥对
并将其添加到 redmine 帐户设置中来解决。
This frequently gets (1, 2, 3, and myself) resolved by re-generating the ssh keypair
and adding it at the redmine account settings.