gitlab hook declined错误
在向gitlab提交工程的时候,出现错误提示:
remote: GitLab: You are not allowed to access master!
remote: error: hook declined to update refs/heads/master
To sa_gitlab@192.168.xxx:xxx/xxx.git
! [remote rejected] master -> master (hook declined)
这个问题主要是由于git工程里的hooks/post-receive和update引起的。可以删除这两个文件;
但是问题的根源不在这,在新建工程的hooks里面的这两个文件只是ln -s 出来的软链接,关键问题是,这两个软链接链错了位置。
查看 gitlab-shell/lib/gitlab_project.rb这个创建新工程的文件,里面有
def add_project
FileUtils.mkdir_p(full_path, mode: 0770)
#cmd = "cd #{full_path} && git init --bare && #{create_hooks_cmd}"
cmd = "cd #{full_path} && git init --bare"
system(cmd)
end
def create_hooks_cmd
pr_hook_path = File.join(ROOT_PATH, 'hooks', 'post-receive')
up_hook_path = File.join(ROOT_PATH, 'hooks', 'update')
#2013年11月5日 <feixiang> path alway add /home/repositories/ ,but what we want is a absolute path , comment it
"ln -s #{pr_hook_path} #{full_path}/hooks/post-receive && ln -s #{up_hook_path} #{full_path}/hooks/update"
end
把create_hooks_cmd注释了即可,但是,这样在后面如果要在网页修改hooks的话,可能还会出问题...
gitlab hook declined错误的更多相关文章
- git push解决办法: ! [remote rejected] master -> master (pre-receive hook declined)
前天准备上传一个project到GitLab上,但是试了很多次都上传不上去,报错如下: ! [remote rejected] master -> master (pre-receive hoo ...
- 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 ...
- ! [remote rejected] master -> master (pre-receive hook declined)
前天准备上传一个project到GitLab上,但是试了很多次都上传不上去,报错如下: ! [remote rejected] master -> master (pre-receive hoo ...
- git remote: error: hook declined to update
提交一个项目,push的时候,报错: remote: error: File xxx.rar is MB; this exceeds Git@OSC's file size limit of 100 ...
- Git push提示pre-receive hook declined
master:local auto@ubuntu:~/src/code/ git push Counting objects: 5, done. Delta compression using up ...
- hook declined to update refs/heads/dev
提交一个项目,push的时候,报错: warning: Large files detected. remote: error: File TaodangpuAuction/TaodangpuAuct ...
- git:hook declined FATAL: W refs/heads DENIED by fallthru error
hook declined FATAL: W refs/heads DENIED by fallthru error git提交代码时报错,网上查了,最终结果竟然是测试人员没有给我配置写的权限,配置了 ...
- 断电后gitlab报500错误启动出错
异常断电后,gitlab报500错误,重启无效 通过sudo gitlab-ctl reconfigure启动时, 提示 [execute] pgsql:could not connect to se ...
- To ssh://xxx.com:8022/test/project.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'ssh://xxx.com:8022/test/project.git'
To ssh://xxx.com:8022/test/project.git ! [remote rejected] master -> master (pre-receive hook dec ...
随机推荐
- [Git] Change the commit message of my last commit
Did you make a typo in your last commit message? No problem, we can use the git --amend command to c ...
- firefox chrome ie9,10,11 不支持selectSingleNode和selectNodes的解决方法
firefox并不支持selectSingleNode和selectNodes的解决方法 function test(){ var perid = document.thisForm.PerID.va ...
- 获取sevlet response值
调用: PrintWriter out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), "UTF-8 ...
- jQuery函数的等价原生函数代码示例
选择器 jQuery的核心之一就是能非常方便的取到DOM元素.我们只需输入CSS选择字符串,便可以得到匹配的元素.但在大多数情况下,我们可以用简单的原生代码达到同样的效果. .代码如下: //---- ...
- 求两个有序数组的中位数或者第k小元素
问题:两个已经排好序的数组,找出两个数组合并后的中位数(如果两个数组的元素数目是偶数,返回上中位数). 设两个数组分别是vec1和vec2,元素数目分别是n1.n2. 算法1:最简单的办法就是把两个数 ...
- android studio 开发经常使用快捷键使用分享
windows开发经常使用快捷键 实体类生成get set 等方法 快捷生成变量快捷 windows开发经常使用快捷键 实体类生成get set 等方法 快捷键 alt + insert 快捷生成变量 ...
- 【shell】各种括号()、(())、[]、[[]]、{}的使用
圆括号 1.单圆括号() ①命令组,括号中的命令将会开启一个子shell独立运行:括号中以分号连接,最后一个命令不需要;各命令和括号无需空格 Linux:/qins # (var=1;echo $va ...
- UAC 实现原理及绕过方法
目录 0x00 UAC 工作流程 0x01 UAC 实现方法(用户登陆过程) 0x02 UAC 架构 0x03 触发UAC 0x04 UAC 虚拟化 0x05 UAC 逆向分析 1x00 UAC By ...
- Spring 3整合Quartz 2实现定时任务三:动态暂停 恢复 修改和删除任务
前面我们已经完成了spring 3和quartz 2的整合以及动态添加定时任务,我们接着来完善它,使之能支持更多的操作,例如暂停.恢复.修改等. 在动态添加定时任务中其实已经涉及到了其中的一些代码,这 ...
- 阿里云设置CDN加速访问OSS文件
快速配置OSS:https://help.aliyun.com/document_detail/31885.html?spm=5176.doc31886.6.97.8iuJo5 快速配置CDN:htt ...