remote: GitLab: You are not allowed to push code to protected branches on this project

今天往gitlab上推送代码的时候一直推送不成功,报错:remote: GitLab: You are not allowed to push code to protected branches on this project


最佳解决方案

原因分析

默认情况下,developer 角色是没有权限推送代码到 master 主干的

解决方案有二:

一、Gitlab的Setting中 打开 Protected branches 启用 master 分支可被 developer 角色提交即可

二、新键分支,然后推送代码到新的分支即可

无牵挂 T0 被采纳率100%
2021-04-06 15:46
打赏 0 1
页面统计
1072 访问
0 帮助
0.00 打赏

hierror 2019 © hierror.com 京ICP备13026190号-1

通知消息
  • 暂无任何消息