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

2,278 阅读1分钟

image.png

remote: GitLab: You are not allowed to push code to protected branches on this project 不允许将代码推送到该项目上受保护的分支

这意味着还没有要保护的master分支,因为空存储库没有分支。

要"启用/禁用分支保护",您需要是GitLab项目的主管理员或所有者。

该分支是master是受保护分支,无论是master还是开发者都无权限push,只有owner可以操作。

一般我们作为developer,是没有master权限的,只有master才有合并代码权限。

以下为gitLab的权限介绍:

GitLab中用户的五种权限 Guest、Reporter、Developer、Master、Owner-腾讯云开发者社区-腾讯云 (tencent.com)

修改方法,联系管理员,打开gitlab ===> setting ===> 修改成员角色

image.png

image.png