使用 gitolite 设置个人分支权限
我在使用 gitolite 设置个人分支权限时遇到一些问题。
gitolite.conf:
repo ulul
RW+ = @admins
RW+ personal/USER/ = @devs
R = @devs
- = @devs
错误消息(推送时): W refs/heads/jesse jesse 被 refs/.* 拒绝了
已编译的 gitolite 文件中的相关部分: '杰西' => [
[
8、
'refs/.*',
'R'
],
[
16、
“refs/heads/personal/$gl_user/”,
“RW+”
],
[
24、
'refs/.*',
'-'
]
],
I'm having some issues getting personal branch permissions set up using gitolite.
gitolite.conf:
repo ulul
RW+ = @admins
RW+ personal/USER/ = @devs
R = @devs
- = @devs
Error message (when pushing):
W refs/heads/jesse jesse DENIED by refs/.*
Relevant piece from the compiled gitolite file:'jesse' => [
[
8,
'refs/.*',
'R'
],
[
16,
"refs/heads/personal/$gl_user/",
'RW+'
],
[
24,
'refs/.*',
'-'
]
],
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要详细说明您自己的答案,重要的部分是:
$gl_user
是在其 强制命令机制。该名称是通过 gitolite 注册的公钥之一。
To detail your own answer, the important part is:
$gl_user
is the variable set after the name passed in parameter of the scripts called ssh in its forced command mechanism.That name is the one of the public key registered through gitolite.
想通了。事实证明,personal/USER/ 只是命名空间;因此创建像personal/jesse/main这样的分支效果很好。希望这对未来的 gitolite 用户有所帮助。
Figured it out. Turns out the personal/USER/ is just the namespace; so creating branches like personal/jesse/main works fine. Hope this helps future gitolite users.