gitolite howto 允许完全访问所有分支,但限制特定集合

gitolite howto allow full access to all branches, but restrict for a specific set

我想配置 gitolite 以便

  1. 开发者无法推送到 master 和 stage1
  2. 开发人员可以对所有其他分支(他们想要的任何名称)进行 RW 操作

我想到的最好的事情是:

repo foo bar

    RW        = @developers
    R  master = @developers
    R  stage1 = @developers

但第一条规则授予开发人员对所有分支的完全访问权限。 那么如何才能做到呢?

Following this example, the order of those access rules 应该工作(正常然后 VREF):

-  master = @developers
-  stage1 = @developers
RW        = @developers

请参阅“access control rule matching”了解确切的访问控制规则应用秘诀。

从 gitolite 3.6.1 开始,您可以快速轻松地跟踪此逻辑:

gitolite access -s foo adeveloper W any

更一般地说,您的初始设置应该有效:

正如 Mort, there is no VREF rules here, only "refex" rules 所评论的,因为它们适用于 repo

中的真实引用

由于未提供 refex,因此默认为 refs/.*