“You are not allowed to push code to protected branches on this project.”

编程入门 行业动态 更新时间:2024-10-22 12:33:46

问题描述

代码提交到Git上,我可以正常push代码, 但是同事无法push,并提示报错“You are not allowed to push code to protected branches on this project.”

问题定位

登录gillab查看项目管理者身份,

我的身份是Maintainers

同事的身份是Developers

问题解决

Since GitLab 9.0
Project: “Settings” -> “Repository” -> scroll down to “Protected branches”.
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.

设置–仓库–保护分支

设置Maintainers+Developers 都有push代码的权限

更多推荐

“You are not allowed to push code to protected branches on this project.”

本文发布于:2023-06-14 08:49:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1458529.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:code   push   allowed   project   branches

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!