git push解决办法: ! [remote rejected] master -> master (pre-receive hook declined)
前天准备上传一个project到GitLab上,但是试了很多次都上传不上去,报错如下:
! [remote rejected] master -> master (pre-receive hook declined)
截图:
一开始还以为自己用户名和密码错误,试了好多次,网上搜所索也没搜索到明确的结果,不过最后还是找到了解决的办法。
git push不上去的原因在于所push的分支权限为protected,只有项目的管理员或者项目的管理员指派的具有相应权限的人才能进行push,要进行项目的push,有如下两种方法:
1.将所要push的内容所在的分支的protected权限关闭
(1)进入所在项目的settings
(2)点击进入Protected branches,点击unprotected将master分支的权限改变,即关闭master的protected权限
2.新建其它分支,将项目push到新建的分支上,后期再进行merge
(1)新建分支
git branch 分支名
(2)切换分支
git checkout 分支名
(3)进行项目上传
git add .
git commit -m "提交的信息"
git remote add origin 远程仓库地址
git push -u origin 分支名
git push解决办法: ! [remote rejected] master -> master (pre-receive hook declined)的更多相关文章
- Git push时报错 ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to......
今天在使用Git回退到之前某个版本的代码时,进行push时出现如下错误: ! [remote rejected] master -> master (pre-receive hook decli ...
- jenkins持续集成源码管理选项为None,构建失败找不到git.exe解决办法
我的jenkins版本为Jenkins ver. 2.19.1 1.源码管理选项只有None的解决办法: 在插件管理中心,搜索对应的源码管理插件这里以git为例,搜索git plugin点击右下角的安 ...
- git push fatal: The remote end hung up unexpectedly
git push fatal: The remote end hung up unexpectedly git config http.postBuffer git gc --aggressive 不 ...
- git push后出现错误 ![rejected] master -> master(non-fast-forward) error:failed to push some refs to 'XXX'
本地创建了一个project并在GitHub上创建了一个仓库,想要将本地的仓库链接到远程仓库我用的是如下方法:git init //初始化本地仓库git remote add origin XX ...
- 错误:error: failed to push some refs to 'https://github.com/pzq7025/KG.git'的解决办法
一.问题在进行[git push orgin master]的时候出现如下错误 ! [rejected] master -> master (non-fast-forward) error: f ...
- Git push 时如何避免出现 "Merge branch 'master' of ..."
在使用 Git 的进行代码版本控制的时候,往往会发现在 log 中出现 "Merge branch 'master' of ..." 这句话,如下图所示.日志中记录的一般为开发过程 ...
- 解决:git使用git push 命令跳出remote: Permission to A denied to B的问题
开始git上传项目,不料,在git push这一步骤发生了错误? remote: Permission to qwe2193066947/firstRepository.git denied to m ...
- git 冲突解决办法
1. Pull is not possible because you have unmerged files. 症状:pull的时候 $ git pull Pull is not possible ...
- linux git 报错提示 fatal: 'origin' does not appear to be a git repository 解决办法
输入: git pull origin master git报错提示 fatal: 'origin' does not appear to be a git repository fatal: Cou ...
随机推荐
- Ubutnu16.04安装pytorch
1.下载Anaconda3 首先需要去Anaconda官网下载最新版本Anaconda3(https://www.continuum.io/downloads),我下载是是带有python3.6的An ...
- cmake的安装和卸载
cmake介绍: CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程).他能够输出各种各样的makefile或者project文件,能测试编译器所支持的C++特性 ...
- sql嵌套批量更新
嵌套批量更新 UPDATE CheLiang SET lineName = t.linename FROM TeamJiHua t ,CheLiang tc WHERE t.id = tc.teami ...
- jQuery淡入淡出的轮播图
html结构: <div class="banna"> <ul class="img"> ...
- Linux 下开启ssh服务
在虚拟机里安装完后,想往虚拟机里拷贝软件 当使用Xmanager ftp连接时候 出现 连接不上的问题,其解决方案如下: 1.修改sshd_config文件,命令为:vim /etc/ssh/sshd ...
- EventBus In eShop -- 解析微软微服务架构Demo(四)
引言 大家好像对分析源码厌倦了,说实在我也会厌倦,不过不看是无法分析其后面的东西,从易到难是一个必要的过程. 今天说下EventBus,前几天园里的大神已经把其解刨,我今天就借着大神的肩膀,分析下在e ...
- mysql 左连接 右连接 内链接
一般所说的左连接,右连接是指左外连接,右外连接.做个简单的测试你看吧.先说左外连接和右外连接:[TEST1@orcl#16-12月-11] SQL>select * from t1;ID NAM ...
- iis部署wcf服务过程
一.在iis网站中添加wcf服务,一直添加到web.config目录即可 二.点击基本设置-->连接为-->特定用户.填写登入电脑的用户名和密码. 三.点击身份验证 四.控制面板,设置防火 ...
- [leetcode-438-Find All Anagrams in a String]
Given a string s and a non-empty string p, find all the start indices of p's anagrams in s.Strings c ...
- 再谈AbstractQueuedSynchronizer:基于AbstractQueuedSynchronizer的并发类实现
公平模式ReentrantLock实现原理 前面的文章研究了AbstractQueuedSynchronizer的独占锁和共享锁,有了前两篇文章的基础,就可以乘胜追击,看一下基于AbstractQue ...