我在亚马逊WS上托管了Gitloite第3版(Git v1.9.1 / gitolite v3.6.1-6)
我有以下设置:
Acme-Repository
|
|------- <JEE>
|
|--------<Android>
|
|--------<iPhone>
我需要将用户的权限限制在以下文件夹中:
• Usera - Read/write - JEE
• UserB - Read/write - Android
• UserC - Read/write - iPhone
我在gitolite.config中有以下设置
RW+ Jee/ = UserA
RW+ Android-App/ = UserB
RW+ iPhone-App/ = UserC
按UserA
时,我收到以下错误:
remote: FATAL: W refs/heads/master Acme-Repository UserA DENIED by fallthru
remote: error: hook declined to update refs/heads/master
我试过了:
RW+ NAME/Jee/ = UserA
..
AND
RW+ refs/head/Jee/ = UserA
..
但两人都返回了相同的结果。 可能出现什么问题?我尝试了this,this和this
更新 - 现在正在运行配置
在原作者Sitaram对谷歌小组的回答以及来自@vonc的回答之后 - 现在我有以下内容并且像魅力一样:
@AllDevelopers = UserA UserB UserC
@Jee = UserA
@Android = UserB
@iPhone = UserC
RW+ = @AllDevelopers
- VREF/NAME/Jee/ = @Android @iPhone
- VREF/NAME/Android-App/ = @Jee @iPhone
- VREF/NAME/iPhone-App/ = @Android @Jee
上述人类语言的配置意味着什么 -
答案 0 :(得分:1)
VREF (见gitolite doc)
保护文件或目录不受影响VREF/NAME/xxx
在你的情况下(VREF/NAME
doc):
@users = UserA UserB UserC
repo Acme-Repository
# allow pushing to any branch for any paths
RW+ = @users
# except for those specific paths:
- VREF/NAME/Jee/ = UserA
- VREF/NAME/Android-App/ = UserB
- VREF/NAME/iPhone-App/ = UserC
由于VREF被视为“additional deny rule”,因此您需要在限制使用VREF规则进行访问之前先允许访问(RW+ @users
)。
(刚看到Sitaram Chamarty - gitolite的作者 - answer on groups.google.com)