I think I misunderstand how to use merge_request.create, since it just wont work…
I want to disable direct push to a branch, and instead get a merge request to review. I set “none” to Allowed to push, and allowed to merge to the user I tested with. Using git client version 2.17.1, that should have support for -o option.
When I try git push -o merge_request.create I get:
remote: GitLab: You are not allowed to push code to protected branches on this project.
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ‘https://gitlab.com/[...]/test.git’
What am I missing? If I enable push to the user, the -o option is simply ignored and the code gets pushed without creating a merge request.