0

Is it possible to merge a feature-branch into a protected branch via CLI? The settings of the protected branch allow to merge for devs, but not push.

If you create a merge request there is an instructions for using the cli, but it doesn't work with the protected branch setting:

CLI instructions

Has anybody an idea what I'm doing wrong?

Thanks!

Bsquare ℬℬ
  • 4,423
  • 11
  • 24
  • 44
Sebastian A.
  • 105
  • 1
  • 8
  • The CLI instructions are generic and don't take into account protected branch. So, the simple answer, no, you cannot do that. – Aleks G Dec 17 '18 at 09:02

1 Answers1

0

As of GitLab 8.11, you can define who is allowed to push to protected branches. See documentation about protected branches to see how to specify protected branch push settings.

Apart from that, there is no way to push to a protected branch. That's why a branch is protected in the first place: to keep people from changing its contents without review (i.e. in another way than by merge requests).

EDIT: Also see this good answer about how to configure protected branches.

kowsky
  • 12,647
  • 2
  • 28
  • 41