“错误:gitosis.serve.main:存储库读取访问被拒绝”当尝试克隆 git 存储库时

发布于 2024-11-10 01:13:05 字数 827 浏览 2 评论 0原文

我有一台运行 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

请爱~陌生人 2024-11-17 01:13:05

首先我会用 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.

我们只是彼此的过ke 2024-11-17 01:13:05

当我尝试推送新存储库时,我遇到了同样的错误。这是由于 /var/git/repositories/gitosis-admin.git/hooks/post-update 缺少权限造成的

sudo chmod a+x /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

sudo chmod a+x /var/git/repositories/gitosis-admin.git/hooks/post-update
瞳孔里扚悲伤 2024-11-17 01:13:05

这经常得到 (1, 23 和我自己)通过重新生成 ssh 密钥对

ssh-keygen -t rsa

并将其添加到 redmine 帐户设置中来解决。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文