error: You are not allowed to push code to protected branches on this project.
...
error: failed to push some refs to ...

there's no problem - everything works as expected.

In GitLab some branches can be protected. By default only 'master' user can commit to protected branches. master branch is protected by default - it forces developers to issue merge requests to be validated by project master before integrating them into main code.

You can turn on and off protection on selected branches in Project Settings (where exactly depends on GitLab version - see instructions below).

On the same settings page you can also allow developers to push into the protected branches. With this setting on, protection will be limited to rejecting operations requiring git push --force (rebase etc.)

I'm not really sure when this change was introduced, screenshots are from 10.3 version.

Now you can select who is allowed to merge or push into selected branches (for example: you can turn off pushes to master at all, forcing all changes to branch to be made via Merge Requests). Or you can click "Unprotect" to completely remove protection from branch.

source:

https://stackoverflow.com/questions/32246503/how-to-fix-you-are-not-allowed-to-push-code-to-protected-branches-on-this-proje

Git you are not allowed to push code to protected branches on this project?的更多相关文章

  1. 【错误解决】git报错:you are not allowed to push code to protected branches on this project

    场景回忆: 本地修改需要退回到之前的版本,打算强制push本地版本覆盖远程版本,但是在git push --force后出现了以下的错误: Fix GitLab error: "you ar ...

  2. git报错_you are not allowed to push code to protected branches on this project

    问题描述 今天在提交代码的时候,由于使用的是新库,写完代码后,进行push,发现报错 you are not allowed to push code to protected branches on ...

  3. remote: GitLab: You are not allowed to push code to protected branches on this project.

    "C:\Program Files\Git\bin\git.exe" push --recurse-submodules=check --progress "origin ...

  4. you are not allowed to push code to protected branches on this project(转)

    .. 图 1-1 报错:failed to push some refs to 'http://*******.git'. 一痛瞎踅摸之后,远程控制电脑,在H电脑上,重新建立了一个test项目,之后走 ...

  5. GitLab: Deploy keys are not allowed to push code.

    被这个问题坑了,大半天.写此博文,愿入坑的童鞋能及时托坑 一.当你第一次pull或者push gitlab远程项目的时候提示你一个该建立一个sshkey,此时你在客户端生成sshkey 二.切记要把这 ...

  6. git报错You are not allowed to force push code to a protected branch on this project

    当我们有时候回滚了代码,想强制push到远程仓库的时候, git push origin --force 会报如下错误: You are not allowed to force push code ...

  7. Operation not allowed for reason code "7" on table 原因码 "7"的解决

    对表进行任何操作都不被允许,提示SQLSTATE=57016 SQLCODE=-668 ,原因码 "7"的错误:SQL0668N Operation not allowed for ...

  8. Git 远程分支的pull与push

    Git 远程分支的pull与push 远程分支信息查看 git branch -r #查看远程分支 git branch -a #查看所有分支,本地和远程 git remote show [remot ...

  9. git撤销本地提交但未push的记录

    ### git撤销本地提交但未push的记录 前言:有时候本地执行commit命令或者cherry-pick命令后发现提交了不需要提交的东西,就需要把已提交的commit记录撤销下来,简单做下记录 撤 ...

随机推荐

  1. mysql5.6新补充

    输入:cd C:\Program Files(x86)\MySQL\MySQL Server 5.6\bin 回车 然后输入:mysqld -install再回车 然后出现 安装成功后,再输入net ...

  2. Spring Cloud学习总结(非原创)

    文章大纲 一.课程内容总结二.课程学习地址三.学习资料下载四.参考文章 一.课程内容总结   二.课程学习地址 第一天:https://www.jianshu.com/p/a086421f4bfd第二 ...

  3. workflow engine Ruote初体验之二(通用属性)

    罗列一下表达式所支持的属性: :timeout :if/ unless :forget :lose :flank :on_error :on_cancel :on_timeout :tag :filt ...

  4. Android Spinner In Toolbar

    As the title of the post suggest in this tutorial we will see how to have spinner widget inside the ...

  5. span设置padding无效

    <span style="display:inline-block;padding-top:10px">测试<span> 给span加属性 display: ...

  6. 2016.11.14 MIT challenge之课程总览

    Degree Chartshttp://catalog.mit.edu/degree-charts/computer-science-engineering-course-6-3/ MIT Chall ...

  7. linux中shell脚本中系统预先定义的变量

    $0:脚本名称: $*:所有参数: $$:当前进程或者脚本的PID号: $!:后台运行的最后一个进程的PID号: $?:用于返回上一个命令是否成功.成功0,否则为非零: $#:参数个数: $@:所有参 ...

  8. 25:坐标移动CoordinateMove

    题目描述 开发一个坐标计算工具, A表示向左移动,D表示向右移动,W表示向上移动,S表示向下移动.从(0,0)点开始移动,从输入字符串里面读取一些坐标,并将最终输入结果输出到输出文件里面. 输入: 合 ...

  9. C# 实现和调用自定义扩展方法

    定义和调用扩展方法 定义一个静态类以包含扩展方法.该类必须对客户端代码可见. 将该扩展方法实现为静态方法,并使其至少具有与包含类相同的可见性. 该方法的第一个参数指定方法所操作的类型:该参数必须以 t ...

  10. java 方法重写原则

    方法重写应遵循“三同一小一大”原则: “三同”:即方法名相同,形参列表相同,返回值类型相同: “一小”:子类方法声明抛出的异常比父类方法声明抛出的异常更小或者相等: “一大”:子类方法的访问修饰符应比 ...