问题
Is it possible to for me to stop members specific group be able to do commit containing ant file other than specified
Example
Stop @legal from pushing commits which contains file other than static/html/legal.html
RWC refs/heads/master = @legal - VREF/NAME/static/html/[^legal.html]$ = @legal
回答1:
As I explained in "In gitolite, any easier way to create exceptions to users of @all?", the access rules follow a rule of accumulation.
In your case, you could grant read-access for all, and deny a directory for @legal
, except for one file. Something like (not tested):
RW refs/heads/master = @all
- VREF/NAME/static/html = @legal
RW VREF/NAME/static/html/legal.thml = @legal
The idea is for a more specific rule to override a more generic one.
来源:https://stackoverflow.com/questions/16265008/gitolite-vref-name-what-not-to-push