当前位置:   article > 正文

【错误解决】git报错:you are not allowed to push code to protected branches on this project

you are not allowed to push code to protected branches on this project.

场景回忆:
本地修改需要退回到之前的版本,打算强制push本地版本覆盖远程版本,但是在git push --force后出现了以下的错误:
Fix GitLab error: “you are not allowed to push code to protected branches on this project”?

问题原因:
原来gitlab对应的分支进行分支保护设置。

解决方法:
"Settings" -> "Repository" -> scroll down to "Protected branches" 改成unprotected就好。

如图:
1225554-20190826165507190-723194202.png

参考来源:
https://stackoverflow.com/questions/32246503/fix-gitlab-error-you-are-not-allowed-to-push-code-to-protected-branches-on-thi

转载于:https://www.cnblogs.com/everfight/p/protected_branches.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/184550?site
推荐阅读
相关标签
  

闽ICP备14008679号