自搭gitlab报错--git operation was rejected by pre-receive hook

自己编译gitlab源码搭建中文版gitlab完成后突然无法提交,gitlab服务使用正常,可是新建库文件,gitclone的时候报错。用gitlab本身也报错。

报错git operation was rejected by pre-receive hook

无意间找到一个检测gitlab的是否完整的命令

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

GitLab Shell version >= 2.7.2 ? ... OK (2.7.2)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
hooks directories in repos are links: ...
Administrator / tgrambaseline1.0 ... repository is empty
Administrator / testing ... ok
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: FAILED. code: 404
gitlab-shell self-check failed
  Try fixing it:
  Make sure GitLab is running;
  Check the gitlab-shell configuration file:
  sudo -u git -H editor /home/git/gitlab-shell/config.yml
  Please fix the error above and rerun the checks.

从日志可以看出 提示我 gitlab-shell有问题 让我改 /home/git/gitlab-shell/config.yml 文件

先查看一下这个文件

sudo -u git -H vi /home/git/gitlab-shell/config.yml

user: git
gitlab_url: http://xxx.xxx.xxx.xx/
http_settings:
  self_signed_cert: false
repos_path: "/home/git/repositories/"
auth_file: "/home/git/.ssh/authorized_keys"
redis:
  bin: "/usr/bin/redis-cli"
  namespace: resque:gitlab
  socket: "/var/run/redis/redis.sock"
log_level: INFO
audit_usernames: false

GitLab设置IP或者域名有两个配置文件:

1、GitLab的:/home/git/gitlab/config/gitlab.yml

2、GitLab-Shell的:/home/git/gitlab-shell/config.yml

把两个配置文件的IP或者域名修正过来即可。在GitLab-Shell的配置文件中,如果域名带端口号,也要把端口号写上。例如我的是gitlab_url: "http://gitlab.xxxx.xxxx.com:8088/"

加上端口号就好了。

时间: 2024-09-14 14:29:37

自搭gitlab报错--git operation was rejected by pre-receive hook的相关文章

arcgis-ArcSDE 做POST报错Error: Operation Failed (-1).

问题描述 ArcSDE 做POST报错Error: Operation Failed (-1). 同一主机:Windows2008 R2 64位,ArcSDE for 11g 64bit 本机Oracle11g64位服务端,Oracle11g 32位客户端,Oracle10g 32为服务端 环境变量 path C:appAdministratorproduct11.2.0client_1bin;E:appAdministratorproduct11.2.0dbhome_1bin;C:Progra

ArcSDE 做POST报错Error: Operation Failed (-1). SDE release install not completed.

问题描述 同一主机:Windows2008R264位,ArcSDEfor11g64bit本机Oracle11g64位服务端,Oracle11g32位客户端,Oracle10g32为服务端环境变量pathC:appAdministratorproduct11.2.0client_1bin;E:appAdministratorproduct11.2.0dbhome_1bin;C:ProgramFiles(x86)CommonFilesNetSarang;%SystemRoot%system32;%S

maven 项目tomcat启动总是报错,而且项目是直接从团队git仓库下的,是我的环境配置问题吗

问题描述 maven 项目tomcat启动总是报错,而且项目是直接从团队git仓库下的,是我的环境配置问题吗 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.github.diamond.client.spring.MessagePropertyPlaceholderConfigurer#0': Invocation of init method failed;

git 命令行提交项目报错

问题描述 git 命令行提交项目报错 项目有子目录的话提交报错: fatal: Pathspec '文件夹' is in submodule 'modules/iphone/文件夹' 我是一层层git add 文件夹 当add到第二层文件夹的时候就报错了: 第二种情况: 我整个项目都在命令行提交 git add -A :git commit -m "XXX" 报错 Changes not staged for commit: modified: quHaoCRM (modified c

自己初次搭的JSP网站,传到SAE上时好时坏,报错是加载不成功,什么原因?

问题描述 看视频一步一步搭的爬虫网站,爬取的是新闻网站的新闻:网址是:http://jugg1024.sinaapp.com/之前我是用java写的程序,调用了一个外接的jar包,叫HTMLParser,然后可以爬取网站的内容.然后想把它移植到web上,所以才学的JSP开发,看的教程是myeclipse+tomcat完成开发的,我就只写了一个index.jsp,一个result.jsp,前者的接受输入网址,后者显示爬取结果,然后我在本地访问tomcat的服务器的时候,是不会报错的.但是我把代码打

git 的commit -a报错 请教大神们

问题描述 git 的commit -a报错 请教大神们 提示错误 : -bash: printf: `S': invalid format character 请问一下 这是什么问题呢 解决方案 请教各位大神!!! 解决方案二: 你的 comment 里是不是有什么特殊字符! 解决方案三: 你git commit提交的里面有字符串不对 解决方案四: 解决方案五:

求助!androidstudio修改代码后git提交修改为何报错没有匹配GIT

问题描述 求助!androidstudio修改代码后git提交修改为何报错没有匹配GIT Commit failed with error: pathspec 'src/main/java/app/leeweather/com/myapplication/MainActivity.java' did not match any file(s) known to git. 我是修改了主活动,新建了一个布局文件,然后提交的. 解决方案 git修改提交 解决方案二: 试着让你的本地仓库git fetc

npm install 报错: operation not permitted, rename

运行 npm install 命令安装依赖包,在 Mac 上的 Vagrant 装的虚拟机上没问题,在阿里云 CentOS 上也没问题,但是在 Windows 环境同样是 Vagrant 装的环境相同的虚拟机上就是不成功,报错如下: npm ERR! Error: EPERM: operation not permitted, rename '/usr/share/nginx/html/tanteng.me/node_modules/duplexify' -> '/usr/share/nginx

【redis】5.spring boot项目中,直接在spring data jpa的Repository层使用redis +redis注解@Cacheable直接在Repository层使用,报错问题处理Null key returned for cache operation

spring boot整合redis:http://www.cnblogs.com/sxdcgaq8080/p/8028970.html 首先,明确一下问题的场景 之前在spring boot整合redis,关于redis的使用都是在repository层上再封装一层service层,在service层上使用的. 现在如果直接将redis的注解放在repository上使用,是个什么情况呢? 代码如下: 1.首先我有一个实体XxAdmin,主键为id 2.Xxadmin我写了一个AdminRep