How to allow per user protected branches access in

2020-02-11 05:47发布

GitLab allow me create protected branches and then specified witch users will have push access to those protected branches. But what about if I want some users access to some, but not all protected branches on the same repo? I mean, a more discrete/granulated user-branch permissions.

2条回答
我想做一个坏孩纸
2楼-- · 2020-02-11 05:50

There is no read-access possible with git (even gitolite couldn't do it, before it got dropped with gitlab 5.0): if you can access a repo, you have access to all its branches. You can protect against push, but not pull. Fork is available in GitLab 5.2, as Steven mentions, so you have that solution.

查看更多
够拽才男人
3楼-- · 2020-02-11 05:58

Those types of permissions do not exist in GitLab.

As an alternative approach: you can make the user unable to commit to the main repository and then use the Project forking workflow allowing them to fork the repository to their own namespace which they can do their work on and then submit a pull request. Similar to the workflow that GitHub follows.

查看更多
登录 后发表回答