Git you are not allowed to push code to protected branches on this project?
Posted sdream
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Git you are not allowed to push code to protected branches on this project?相关的知识,希望对你有一定的参考价值。
error: You are not allowed to push code to protected branches on this project.
...
error: failed to push some refs to ...
there‘s no problem - everything works as expected.
In GitLab some branches can be protected. By default only ‘master‘ user can commit to protected branches. master
branch is protected by default - it forces developers to issue merge requests to be validated by project master before integrating them into main code.
You can turn on and off protection on selected branches in Project Settings (where exactly depends on GitLab version - see instructions below).
On the same settings page you can also allow developers to push into the protected branches. With this setting on, protection will be limited to rejecting operations requiring git push --force
(rebase etc.)
I‘m not really sure when this change was introduced, screenshots are from 10.3 version.
Now you can select who is allowed to merge or push into selected branches (for example: you can turn off pushes to master
at all, forcing all changes to branch to be made via Merge Requests). Or you can click "Unprotect" to completely remove protection from branch.
source:
https://stackoverflow.com/questions/32246503/how-to-fix-you-are-not-allowed-to-push-code-to-protected-branches-on-this-proje
以上是关于Git you are not allowed to push code to protected branches on this project?的主要内容,如果未能解决你的问题,请参考以下文章
IDEA使用Git提交代码remote: GitLab: You are not allowed to push code to protected branches on this project(
git合并分支成功,但是push失败(remote: GitLab: You are not allowed to push code to protected branches on this pr
GitLab: You are not allowed to push code to this project.
GitLab: You are not allowed to push code to this project.
remote: GitLab: You are not allowed to push code to protected branches on this project.
Expo ios Build error: You are not allowed to perform this Operation