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分支已经被保护起来了

相关推荐
极小狐4 小时前
极狐GitLab 功能标志详解
linux·运维·服务器·elasticsearch·gitlab·极狐gitlab
极小狐4 小时前
在极狐GitLab 身份验证中如何使用 JWT?
gitlab·devsecops·devops·mcp
丑过三八线6 小时前
在Linux下安装Gitlab
linux·运维·gitlab
IT布道7 小时前
GitLab本地安装指南
gitlab
极小狐8 小时前
极狐GitLab 安全文件管理功能介绍
linux·运维·数据库·安全·elasticsearch·gitlab
星释13 小时前
GitLab-CI集成FTP自动发布
elasticsearch·ci/cd·gitlab
HX科技2 天前
树莓派_利用Ubuntu搭建gitlab
数据库·ubuntu·gitlab
清瞳清2 天前
软件包安装管理Gitlab
gitlab·deb
遇见火星3 天前
基于Docker容器的CICD项目Jenkins/gitlab/harbor/Maven实战
docker·容器·gitlab·jenkins·maven·harbor·cicd
邹卓为4 天前
docker 安装 Gitlab
docker·容器·gitlab