gitlab保护分支设置

版本:gitlab10.2.2
一旦设置master分支被保护,除了管理员之外的任何用户都无法直接向master提交代码,只要提交代码就会报错

复制代码
# git push -u origin master
Total 0 (delta 0), reused 0 (delta 0)
remote: GitLab: You are not allowed to push code to protected branches on this project.
To [email protected]:develpment/myproject-test.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:develpment/myproject-test.git'

(1) 点击你的项目

(2) 点击【版本库】------【分支】

(3) 管理受保护的分支

(4) 点击展开

(5) 选择保护master分支

(6) 可以看到master分支已经被保护起来了

相关推荐
风屿.7 小时前
部署安装gitlab-ce-17.9.7-ce.0.el8.x86_64.rpm
gitlab
亮1111 天前
GITLAB跑gradle项目 不借助maven-publish直接上传到nexus私人仓库
java·gitlab·gradle·maven
极小狐2 天前
极狐GitLab 通用软件包存储库功能介绍
java·数据库·c#·gitlab·maven
小马爱打代码2 天前
K8S - GitLab CI 自动化构建镜像入门
ci/cd·kubernetes·gitlab
杰克逊的日记2 天前
gitlab相关面试题及答案
gitlab
极小狐2 天前
极狐GitLab 容器镜像仓库功能介绍
java·前端·数据库·npm·gitlab
极小狐2 天前
如何构建容器镜像并将其推送到极狐GitLab容器镜像库?
开发语言·数据库·机器学习·gitlab·ruby
木二_2 天前
实践005-Gitlab CICD全项目整合
ci/cd·gitlab
大米☋2 天前
GitLab搭建与使用(SSH和Docker)两种方式
docker·ssh·gitlab
极小狐3 天前
如何从极狐GitLab 容器镜像库中删除容器镜像?
java·linux·开发语言·数据库·python·elasticsearch·gitlab