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 自定义 ListView 上下拉动刷新最新和加载更多
本文内容 开发环境 演示上下拉动刷新最新和加载更多 ListView 参考资料 本文演示上下拉动,刷新最新和加载更多,这个效果很常见,比如,新闻资讯类 APP,当向下拉动时,加载最新的资讯:向上拉动时 ...
- 保存登录plsql developer 的用户名和密码
1 保存用户名 tools -> Preferences -> User Interface - Options 勾选 Autosave username . 保存 2 保存密码 tool ...
- Lanczos Algorithm and it's Parallelization Stragegy
由于写了降维的一个系列算法分析,本来以为对这个Lanczos算法会理解一点,但是还是不知道讲了什么,最多的就是会如何调用,然后出结果,所以就翻译官网的相关内容.本篇翻译来自Dimensional Re ...
- Plupload上传插件中文帮助文档
Plupload上传插件中文帮助文档 配置参数 实例化一个plupload对象时,也就是 new plupload.Uploader(),需要传入一个对象作为配置参数.后面内容中出现的plupload ...
- 递归的隐含限制——处理对象小的可以、大的不可以
最近自己编写了一个求n阶行列式的值的C程序,编译成功,并且使用了一个3阶行列式进行了测试,测试也成功了.以为这样就万事大吉了,可是后来在实际应用中调用该函数时却导致程序无法运行.注意到,实际应用中要求 ...
- sharepoint 2010 怎样在Ribbon区加入功能button
继续前面的一篇博客,sharepoint 2010 怎样在列表中加入功能菜单操作项.这次主要是记录下,在Ribbon区域加入功能button.比如加入收藏button.例如以下图所看到的: 1. 还是 ...
- Aspect实现对方法日志的拦截记录
在实际的业务系统中,我们通常都希望程序自动的打印方法的入参和返回值,某些特定的方法可能不想打印返回值(返回数据过大,打印日志影响效率),特有了下面的实现. 1.忽略返回值的java注解类 import ...
- django之创建第7-2个项目-url配置分离
1.urls.PY分离 # -*- coding: UTF-8 -*- from django.conf.urls import patterns, include, url # Uncomment ...
- ntp时钟同步
服务器时间的一致性,很关键的. 11. 基于ntp服务的形式 [root@server0 ~]# yum -y install chrony //NTP客户端 centos7.x cent ...
- Ubuntu16.04, Gqrx通过RTL-SDR的Q通道收听中短波
硬件准备 天线: 一根悬垂的3~4米长线天线, 如果只是临时使用, 直接用普通的0.75平方的聚氯乙烯多股软电线就可以了. 巴伦: 9:1巴伦 接收器: Q通道增加低频输入的RTL-SDR接收器 以及 ...