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 ...
随机推荐
- Android通用框架设计与完整电商APP开发系列文章
作者|傅猿猿 责编|Javen205 有福利 有福利 有福利 鸣谢 感谢@傅猿猿 邀请写此系列文章 Android通用框架设计与完整电商APP开发 课程介绍 [导学视频] [课程详细介绍] 以下是部分 ...
- javascript 替换 window.onload 的 document.ready
通常我们想要在页面内容加载完成后运行 JS 时,都会使用 window.onload 来处理,比如: window.onload = function(){ alert('Hello Wor ...
- HTML DOM defaultValue 属性
定义和用法 defaultValue 属性设置或返回文本框的初始内容. 注释:文本框的初始值是位于 <textarea> 和 </textarea> 标签之间的文本.在表单被重 ...
- git设置默认编辑为vim
f you want to set the editor only for Git, do either (you don’t need both): Set core.editor in your ...
- MySql 比Replace Into更适合的用法,外加SqlServer的方式。
Mysql: INSERT INTO `his_examine_result` (Mid,His_Examine_Mid, His_File_Mid, ResultType, His_Employee ...
- html转译字符 字符实体
http://www.w3school.com.cn/html/html_entities.asp http://www.w3school.com.cn/tags/html_ref_entities. ...
- Android sdk content loader 0%
打开Eclipse以后,一直在Android sdk content loader 0%,等了很长时间都没有变,解决的方法是Project->Clean->Clean all projec ...
- python2和python3网络访问包
python3 import http.client import urllib.parse python2 import httplib import urllib
- 跟 Google 学 machineLearning [2] -- 关于 classifier.fit 的 warning
tensorfllow 的进化有点快.学习的很多例子已经很快的过时了,这里记录一些久的例子里被淘汰的方法,供后面参考. 我系统现在安装的是 tensorflow 1.4.1. 主要是使用了下面的代码后 ...
- 转:Flash 插件面板 DragonBonesDesignPanel 的绿色安装方法
最近在cocos2d-js下捣腾Dragonbones.转一个文章,大家可以参考安装Dragonbones.关于这个Dragonbones,5月份的时候还用得好好的,cocos2d-js还能妥妥的加载 ...