How to allow per user protected branches access in GitLab?

拈花ヽ惹草 提交于 2019-11-28 00:58:41

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/17348071/how-to-allow-per-user-protected-branches-access-in-gitlab

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!