热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

GitLab的Developer角色没有权限提交问题

C:\ProgramFiles\Git\bin\git.exepush--recurse-submodulescheck--progressoriginrefsheadsma

"C:\Program Files\Git\bin\git.exe" push --recurse-submodules=check --progress "origin" refs/heads/master:refs/heads/master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Total 3 (delta 1), reused 0 (delta 0)
remote: GitLab: You are not allowed to push code to protected branches on this project.        
To
http://192.168.210.199/XXX.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://192.168.210.199/XXX.git'
Done

 

image

默认 master 分支是处于被保护状态下的,develop 角色是没有权限提交到 master 分支的,Gitlab 更推荐遵循 Gitflow 的方式,临时解决的方式是  Setting中 => Protected branches 启用 master 分支可被 develop 角色提交即可。


推荐阅读
author-avatar
权利阳成_278
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有