今天强推本地分支代码到 GitLab 远程 master 分支上,报错:

git push origin 分支名 --force

错误信息:

! [remote rejected] master -> master (pre-receive hook declined)

原因为master为受保护分支,无法强推代码到 master 分支上。使用Owner觉得Admin角色账号推送都无法成功。

最终解决方案:

进入:Settings -> Repository -> Protected Branches 临时Unprotect master分支(强推成功后一定要重新添加为受保护的分支)

其他原因还有用户的权限不足,关于权限问题详见:

GitLab 官方文档关于 Permissions 的详细说明。

git push 报错 pre-receive hook declined相关推荐

  1. git commit -m XX报错 pre -commit hook failed (add --no-verify to bypass)问题

    在同步本地文件到线上仓库的时候 报错 pre -commit hook failed (add --no-verify to bypass) 当你在终端输入git commit -m "xx ...

  2. 【Git】Git commit至Gitee报错‘remote: error: hook declined to update refs/heads/master‘的解决方法

    Git commit至Gitee报错'remote: error: hook declined to update refs/heads/master'的解决方法 进入到Gitee的邮箱管理中,取消勾 ...

  3. git push报错:remote: error: refusing to update checked out branch: refs/heads/master

    远程仓库通过git init初始化了一个项目,没有clone到本地,本地新建了一个项目,关联本地项目和远程仓库(参见IDEA新建本地项目关联远程git仓库 )后git push报错: wulf@wul ...

  4. git push 报错Push rejected、 remote unpack failed 、unpacker error、 failed to push some refs to

    git push 报错Push rejected. remote unpack failed .unpacker error. failed to push some refs to 1.error: ...

  5. git push报错:fatal: unable to access ‘https://XXXX.git/‘: Peer‘s Certificate issuer is not recognized.

    推镜像的时候,git push报错:fatal: unable to access 'https://XXXX.git/': Peer's Certificate issuer is not reco ...

  6. git push 报错 Empty reply from server 或 Failed to connect to github.com port 443: Time out

    git push 报错 Empty reply from server 或 Failed to connect to github.com port 443: Time out 问题出现 报错信息 问 ...

  7. git push 报错 ---error: commit 8aa8e31: email address yin.jiaqing@.....com is not registered in your

    git push 报错: error: commit 8aa8e31: email address yin.jiaqing@haustart.com is not registered in your ...

  8. git push报错 DENIED by fallthru(or you mis-spelled reponame)

    git push报错 DENIED by fallthru(or you mis-spelled reponame) 百度半天都说是公钥私钥问题 最后发现是管理员没开push权限

  9. git push报错处理办法

    使用办法: git add . git commit -m "原因" git push 如果git push报错 执行: git push origin 本地分支名:远程分支名 例 ...

  10. 码云git push报错 DeployKey does not support push code 解决办法

    码云git push报错 DeployKey does not support push code 解决办法 首先生成公钥去码云添加公钥有具体教程 添加公钥 一顿操作之后测试一下 git push 嗯 ...

最新文章

  1. 匹配3位或4位区号的电话号码,其中区号可以用小括号括起来,也可以不用,区号与本地号间可以用连字号或空格间隔,也可以没有间隔...
  2. Android Studio(14)--点9图片怎么玩
  3. PAT1057. 数零壹
  4. 标准C程序设计七---72
  5. matlab教程曲线拟合,matlab 曲线拟合
  6. 《人性的弱点》--如欲采蜜,勿蹴蜂房。
  7. linux mysql-5.7.13 源码安装,Linux下安装-配置-mysql-5.7.13
  8. 洛谷 P2437 蜜蜂路线
  9. 利用curl去hack他人博客
  10. linux设备驱动程序 脚本之家,linux – 使用systemd自动挂载USB驱动器
  11. ECMAScript6 新特性——“数组的扩展”
  12. C++ 输入输出,IO
  13. 使用gcc编写c语言程序,利用GCC工具编译C语言程序
  14. java程序输入二叉树,JAVA 二叉树代写、代写java二叉树编程作业
  15. 美股-史考特(Scottrade)开户详细说明
  16. 一份完整详细的新媒体营销推广策划方案 (微信微博等)
  17. JavaScript学习笔记(四) ES6
  18. 神威超级计算机配置,神威太湖轻型超级计算机配置和性能列表
  19. JS单击/双击编辑功能
  20. 3dmax软件怎么保存低版本的模型

热门文章

  1. 计算机标准差平方差怎么按,数学标准差公式
  2. LATEX参考文献添加文章doi号并嵌入超链接+IEEE期刊缩写查询
  3. word排版快捷指令_Word怎么快速排版?这12招Word排版小技巧,3分钟完成一个Word文档...
  4. Pr视频剪辑的降噪与花字
  5. 2-2 Aruba控制器 无线漫游优化 2020
  6. u盘efi分区删除方法
  7. package.json配置简介
  8. 程序员被空姐骗到香港做传销!
  9. 如何在Pr中制作镂空字体?
  10. button 和 input 的submit ,reset的区别