git合并分支成功,但是push失败(remote: GitLab: You are not allowed to push code to protected branches on this pr...

紧急修复修改代码之后需要合并分支到master分支并push到线上,但是merge成功,push却失败了,报错如下:

➜  buzzextractor git:(master) git merge hotfix
Updating 4668fce..9527ae9
Fast-forward
 build_online_images.sh           | 2 +-
 extractor/buzz/lib/utils.py      | 2 +-
 extractor/conf/config.ini.bushu  | 2 +-
 extractor/conf/config.ini.online | 2 +-
 extractor/conf/config.ini.test   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
➜  buzzextractor git:(master) git status 
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
➜  buzzextractor git:(master) git push 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 http://code.admaster.co/social-base/buzzextractor.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://houcaiyun@code.admaster.co/social-base/buzzextractor.git'

经过分析查证发现是自己没有合并代码的权限导致的,所以接下来就是修改权限就可以了。

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

修改方法,联系管理员,打开gitlab ===> setting ===> 修改成员角色,就ok了(因为我不是管理员所以没有图截给大家啦。。。)

希望对你有帮助~

转载于:https://www.cnblogs.com/hcy-fly/p/9008323.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值