gitolite permissoins with branches and folders

后端 未结 2 392
盖世英雄少女心
盖世英雄少女心 2021-01-16 04:24

In gitolite I want the @developers to be able to push to any branch except for master.
I want user1 to be able to push to any bran

2条回答
  •  臣服心动
    2021-01-16 05:03

    This should address both:

    repo arepo
      RW          = @developer
      -  master$  = @developer
    
      RW                     = user1
      - master and VREF/NAME/adirectory = user1
    

    The access rules and refex pages explain how /refs/head/master branch is denied for push for @developer.

    The Virtual Refs 'NAME' allows you to deny push for a given directory or file.

    The Drew Lesueur adds in the comments:

      - master VREF/NAME/adirectory = user1
    

    It seems to not be doing an "and" condition but an "or" for us - master VREF/NAME/adirectory = user1
    I ended up writing a custom VREF script for what I needed

    I confirm that, in this case, only a custom VREF can match the OP's requirements, until gitolite 3.5 (and the introduction of 'and'): see sitaram (creator of gitolite)'s answer.

提交回复
热议问题