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 ...
随机推荐
- HTTP 响应实体主体:XML 及 XML parser
本文内容 HTTP 响应实体主体:XML XML parser 总结 各编程语言实现的 XML parser HTTP 响应实体主体:XML 实体主体(entity-body)通常是HTTP响应里 ...
- MogileFS与FastDFS的个人见解
MogileFS与FastDFS的个人见解 六月 9, 2013 1 条评论 MogileFS & FastDFS 为两个开源分布式文件系统,都主要适用于互联网文件共享,上传,下载等功能,主要 ...
- jQuery开发技巧
jQuery 事件 - submit() 方法 $("form").submit(function(e){}); 当提交表单时,会发生 submit 事件. 该事件只适用于表单元素 ...
- Selenium2(WebDriver)总结(五)---元素操作进阶(常用类)
1.Alert类 Alert是指windows弹窗的一些操作,需要new一个Alert类 driver.switchTo().alert():切换到alert窗口 alert.getText():取得 ...
- photoshop 雪碧图制作
图片拖入后 一般取同行同列最高最宽 自动在所选目录生成 打开: 修改 四次请求有点多啊. 打开 (下载)css sprite 自动生成坐标地址. 不过我们要把它排远一点 OK了. 我们生成以后: 坐标 ...
- h5画图表
折线: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8&q ...
- Spark分布式集群的搭建和运行
集群共三台CentOS虚拟机,一个Matser,主机名为master:三个Worker,主机名分别为master.slave03.slave04.前提是Hadoop和Zookeeper已经安装并且开始 ...
- 关于sendtoback()和bringtofront() 的理解
如下的代码: button2.Dock = DockStyle.Top; button1.SendToBack(); button1.Dock = DockStyle.Top; button3.Doc ...
- springMvc基于注解登录拦截器
1.首先先定义一个拦截器注解 @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) p ...
- SQL Server 2012 无人值守安装(加入新实例)
方法1,通过指定条个參数安装 setup.exe /Q /IACCEPTSQLSERVERLICENSETERMS /ACTION=install /PID=<validpid> /FEA ...