场景回忆:
本地修改需要退回到之前的版本,打算强制push本地版本覆盖远程版本,但是在git push --force后出现了以下的错误:
Fix GitLab error: “you are not allowed to push code to protected branches on this project”?

问题原因:
原来gitlab对应的分支进行分支保护设置。

解决方法:
"Settings" -> "Repository" -> scroll down to "Protected branches" 改成unprotected就好。

如图:

参考来源:
https://stackoverflow.com/questions/32246503/fix-gitlab-error-you-are-not-allowed-to-push-code-to-protected-branches-on-thi

【错误解决】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,发现报错 you are not allowed to push code to protected branches on ...

  2. Git you are not allowed to push code to protected branches on this project?

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

  3. Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). Git fet ...

  4. 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 2017年02 ...

  5. git:Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 解决办法一:保 ...

  6. 解决git报错

    解决git报错:fatal: unable to access "https://github.com/.../.git/" 1.在git中执行(记得分开执行) git confi ...

  7. [转]解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

    Git fetch和git pull的区别: 都可以从远程获取最新版本到本地 1.Git fetch:只是从远程获取最新版本到本地,不会merge(合并) $:git fetch origin mas ...

  8. 解决git报错:error: RPC failed; curl 18 transfer closed with outstanding read data remaining 的方法

    报错信息: error: RPC failed; curl 18 transfer closed with outstanding read data remainingfatal: the remo ...

  9. 使用SSH连接解决git报错:fatal: unable to access 'https://github.com/xxx/xxx.github.io.git/': Proxy CONNECT aborted

    TL;DRs 这个错误的原因和HTTPS的代理配置有关,使用SSH方式连接可以避免这一问题 最近git pull和push的时候总是报错 fatal: unable to access 'https: ...

随机推荐

  1. Bag of Tricks for Image Classification with Convolutional Neural Networks笔记

    以下内容摘自<Bag of Tricks for Image Classification with Convolutional Neural Networks>. 1 高效训练 1.1 ...

  2. php中的闭包类

    看注释 <?php //闭包类实现匿名函数 //call方法调用 class Customer { private $firstname; private $lastname; public f ...

  3. Spring AOP 知识点入门

    一.基本知识点 1.AOP概念 AOP(Aspect-Oriented Programming), 即 面向切面编程, 它与 OOP( Object-Oriented Programming, 面向对 ...

  4. 不重装nginx实现动态添加模块

    如果项目在提供服务的过程中,因为需求使然,需要对nginx进行模块的动态添加,可以按照如下流程进行操作 一.查看nginx当前已经安装了那些模块 1) 进入nginx执行文件目录 cd   /usr/ ...

  5. can总线学习网上资料汇总

    https://zhuanlan.zhihu.com/p/30247549?utm_source=wechat_session&utm_medium=social&utm_oi=280 ...

  6. tomcat catalina

    脚本catalina用于启动和关闭tomcat服务器,是最关键的脚本 在tomcat里有此文件 写这个脚本的人为什么命名为catalina一开始我还以为是其初恋女友,后来才知道原来是一个小岛的名字.

  7. 原手下一名98年的java离职了

    原手下一名98年的java离职了,回家考试要2年. 系统做的还算凑合,毕竟年龄在这. 需要改善的地方我会放到自己的项目管理工具中去改善. 离职前他一直跟我说微服务的启动是用docker,也感谢他,我们 ...

  8. xms西软预定列表-房类市场

    select b.descript,sum(a.quan) as quan,case WHEN c.descript is null THEN '团队预留' ELSE c.descript end a ...

  9. AttributeError: module 'pytest' has no attribute 'allure'

    解决 pip3 uninstall pytest-allure-adaptor pip3 install allure-pytest 参考: https://www.cnblogs.com/lansa ...

  10. jdk8可重复key的Map: IdentityHashMap

    编写一个多条件过滤功能时,想使用map作为过滤条件的容器,由于存在同一健匹配多个值的情况,所以就发现了jdk8的新的map:IdentityHashMap.使用它完美解决了我的问题. 对比Identi ...