gitolite disallow access for directory on master branch but not on user branch

不打扰是莪最后的温柔 提交于 2019-11-29 07:19:38
VonC

With Gitolite V3 or 'g3' and its VREF, it should be possible to implement those restrictions.

But the access you can manage is only for write-access.
If a user can clone a repo, he/she will have read-access to all the repo (as mentioned in "gitolite: allow to change only selelected files").
If you really want to limit read-access, you might try gitolite 'partial-copy'.

Few notes:

An access rule is like:

<permission> <zero or more refexes> = <one or more users/user groups>

<zero or more refexes> means your can combines refexes

That would give something like (not tested):

repo REPO
        RW+  master                     =   MAINTAINER
        -    master         VREF/NAME/A =   CONTRIBUTOR
        RW   master         VREF/NAME/B =   CONTRIBUTOR
        RW   personal/USER/ VREF/NAME/A =   CREATOR
        RW   personal/USER/ VREF/NAME/B =   CREATOR
repo REPO
    - master VREF/NAME/src/A = @contributors
    RW+ master = @maintainers @contributors
    RW+ personal/ = @creators
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!