场景回忆:
本地修改需要退回到之前的版本,打算强制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. html中的数据岛:利用DSO和javascript在html中动态加载和浏览xml数据

    1.DSO也叫做数据源对象,IE 4.0引入了DSO,在IE 5.0对DSO技术进行很大的扩展.以往如果数据是通过SQL语言对数据库进行查询得到的结果,那么就把它们存放在ADO(ActiveX Dat ...

  2. python应用-输出验证码

    from random import randint def generate_code (code_len): """ 生成确定位数的验证码 :param code_l ...

  3. 20180519模拟赛T2——pretty

    [问题描述] 小美今天对于数列很有兴趣.小美打算找出一些漂亮的序列.一个漂亮的序列的限制如下: 长度为 n ,而且数列里只包含 [1,n] 的整数. 要不是不降的序列就是不升的序列. 小美想知道有多少 ...

  4. scanner=new Scanner(System.in); int i=scanner.nextInt();

    import java.util.Scanner; public class TryScanner { /** * @param args */ public static void main(Str ...

  5. GeoIP简介与资源,定位经纬度,获取用户IP

    所谓GeoIP,就是通过来访者的IP,定位他的经纬度,国家/地区,省市,甚至街道等位置信息.这里面的技术不算难题,关键在于有个精准的数据库.有了准确的数据源就奇货可居赚点小钱,可是发扬合作精神,集体贡 ...

  6. swift修饰符

    Declaration Modifiers Declaration modifiers are keywords or context-sensitive keywords that modify t ...

  7. 开源项目(5-2) yolo打包成库

    Windows系统下YOLO动态链接库的封装和调用 Windows10+VS2015+OpenCV3.4.1+CUDA8.0+cuDNN8.0 参考教程 https://blog.csdn.net/s ...

  8. 使用Google学术简单方法汇总

    1 Google学术打不开,简单方法汇总. 2   谷歌学术镜像 http://dir.scmor.com/google/ 3,https://xs.glgoo.net/ 4, https://sch ...

  9. ent 基本使用 二 简单create && query

    接上文,前边我们了解了关于基本代码生成以及schema 迁移的学习,下边我们看看基本的数据操作 参考代码: https://github.com/rongfengliang/ent-demo 环境准备 ...

  10. C++智能指针总结

    本文介绍c++里面的四个智能指针: auto_ptr, shared_ptr, weak_ptr, unique_ptr 其中后三个是c++11支持,并且第一个已经被c++11弃用. 为什么要使用智能 ...