Gitolite restrict access to branch

后端 未结 3 1062
生来不讨喜
生来不讨喜 2021-01-03 08:15

I have GITOLITE on my server and I want to configure access to my repository. I want to restrict access to some branches for some users. I try a lot of variants how to confi

3条回答
  •  耶瑟儿~
    2021-01-03 08:57

    As Sufelfay said in the comments to the other posting, this is a bug in recent versions of Gitolite.

    The access check is split into two phases. During the inital phase the ref is unknown and Gitolite is supposed to skip all rules referring to refs.

    In fact, however, it applies all rules but ignores the ref specification. Thus ...

    - test = @developers2
    

    ... is evaluated as ...

    - = @developers2
    

    ... during the first phase. To make matters worse, the error indicates the very last rule which was processed. This rule may be unrelated.

    As workaround you can add an access rule for any before the deny rules:

    RW  any   =  @developers2
    -   test  =  @developers2
    ...
    

提交回复
热议问题