将用户添加到 Gitolite

发布于 2024-11-01 18:28:10 字数 575 浏览 2 评论 0原文

我正在尝试设置 Gitolite,但遇到了一个奇怪的问题:

当我为新用户(例如 raphaelcruzeiro.pub)添加新的公钥文件时,giolite 在推送时向我发送以下警告

remote: 
remote:         ***** WARNING *****
remote:         the following users (pubkey files in parens) do not appear in the config file:
remote: raphaelcruzeiro(raphaelcruzeiro.pub)

:使用此用户克隆存储库,我的权限被拒绝:

Cloning into gitolite-admin...
R access for gitolite-admin DENIED to raphaelcruzeiro
fatal: The remote end hung up unexpectedly

我在这里遗漏了什么吗?在哪里以及如何将用户添加到配置文件中?

不幸的是,Gitolite 的文档在这个问题上相当模糊。

I'm trying to setup Gitolite but I'm running into a weird issue:

When I add a new public key file for a new user (say raphaelcruzeiro.pub), giolite sends me the following warning on push:

remote: 
remote:         ***** WARNING *****
remote:         the following users (pubkey files in parens) do not appear in the config file:
remote: raphaelcruzeiro(raphaelcruzeiro.pub)

And when I try to clone a repository with this user, I get a permission denied:

Cloning into gitolite-admin...
R access for gitolite-admin DENIED to raphaelcruzeiro
fatal: The remote end hung up unexpectedly

Am I missing something here? Where and how do I add the user to the configuration file?

Unfortunately Gitolite's documentation is rather vague on this matter.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

愁杀 2024-11-08 18:28:10

以下是将用户添加到 gitolite 的工作流程:

将用户公钥添加到地图 keys 中,格式为 .pub

编辑您的 gitolite 配置文件 (gitolite.pub) conf),该文件位于地图 conf 中。当你打开它时,一切都会清晰。

示例:

repo  someproject

  RW+ = darhuuk

  RW  = raphaelcruzeiro

  R   = santaclaus

提交新密钥和修改后的配置文件。然后将其推送到您的 gitolite 服务器。

应该这样做!

[编辑] 顺便说一句,这里是 gitolite 段落,解释了我上面写的内容:
http://gitolite.com/gitolite/conf.html

Here's the workflow for adding users to gitolite:

Add the users public key to the map keys as <username>.pub

Edit your gitolite config file (gitolite.conf), this file is in the map conf. When you open it, everthing will be clear.

example:

repo  someproject

  RW+ = darhuuk

  RW  = raphaelcruzeiro

  R   = santaclaus

Commit the new key and the modified config file. Then push it to your gitolite server.

That should do it!

[Edit] BTW, here is the gitolite paragraph that explains what I wrote above:
http://gitolite.com/gitolite/conf.html.

过气美图社 2024-11-08 18:28:10

请注意,最近的 gitolite v3.5.2-10-g437b497 引入了(2013 年 9 月,提交 59c817d0 ):

<一href="http://gitolite.com/gitolite/ukm.html" rel="nofollow">ukm,用于“用户密钥管理”。

用户密钥管理允许某些用户添加和删除密钥。

它引入了一定程度的委托,不仅 gitolite 管理员用户可以添加新的 ssh 公钥,其他用户现在也可以这样做。

您可以在“contrib/t/ 中看到它的实际效果ukm.t”:

您需要启用该功能:

# enable user key management in a simple form.
# Guest key managers can add keyids looking like email addresses, but
# cannot add emails containing example.com or hemmecke.org.
system("sed -i \"s/.*ENABLE =>.*/'UKM_CONFIG'=>{'FORBIDDEN_GUEST_PATTERN'=>'example.com|hemmecke.org'}, ENABLE => ['ukm',/\" $h/.gitolite.rc");

Note that the recent gitolite v3.5.2-10-g437b497 introduces (September 2013, commit 59c817d0):

ukm, for "user key management".

User key management allows certain users to add and remove keys.

It introduces a level of delegation, when not just the gitolite admin user can add new ssh public keys, but other users can now do so as well.

You can see it in action in "contrib/t/ukm.t":

You need to enable that feature:

# enable user key management in a simple form.
# Guest key managers can add keyids looking like email addresses, but
# cannot add emails containing example.com or hemmecke.org.
system("sed -i \"s/.*ENABLE =>.*/'UKM_CONFIG'=>{'FORBIDDEN_GUEST_PATTERN'=>'example.com|hemmecke.org'}, ENABLE => ['ukm',/\" $h/.gitolite.rc");
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文