6

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 Answers2

2

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.

ite-klass
  • 44
  • 4
Steven V
  • 16,357
  • 3
  • 63
  • 76
1

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Forking not cover my needs. I want give USER1 push access to BRANCH1 and not to BRANCH2. With fork I must denied the access (push access) to USER1 to both branches and then ask USER1 make a pull request every time USER1 want change BRACH1 when he could have push access to BRANCH1, increasing the BRANCH1 management due to GitLab limitation. Well, seem to me that this workflow can't be implemented on GitLab. Thanks for your reply. –  Jun 27 '13 at 17:09
  • @gsc-frank I agree: forking makes for cumbersome workflow. So a feature request in their forum is in order, I presume. – VonC Jun 27 '13 at 17:51