zoukankan      html  css  js  c++  java
  • git合并分支成功,但是push失败(remote: GitLab: You are not allowed to push code to protected branches on this project.)

    ➜  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 +-
    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

  • 相关阅读:
    MongoDB 聚合函数及排序
    MongoDB 关系运算符及统计个数及跳过分页
    MongoDB 正则表达式查询
    MongoDB 范围查询
    MongoDB 逻辑运算符
    MongoDB数据库
    python 判断文件夹存在,不存在创建文件夹
    MySQL 数据库操作
    MySQL 数据库连接命令
    PyCharm Django 显示一个简单页面
  • 原文地址:https://www.cnblogs.com/sea-stream/p/12083383.html
Copyright © 2011-2022 走看看