天天看點

自搭gitlab報錯--git operation was rejected by pre-receive hook

自己編譯gitlab源碼搭建中文版gitlab完成後突然無法送出,gitlab服務使用正常,可是建立庫檔案,gitclone的時候報錯。用gitlab本身也報錯。

報錯git operation was rejected by pre-receive hook

自搭gitlab報錯--git operation was rejected by pre-receive hook

無意間找到一個檢測gitlab的是否完整的指令

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

自搭gitlab報錯--git operation was rejected by pre-receive hook

從日志可以看出 提示我 gitlab-shell有問題 讓我改 /home/git/gitlab-shell/config.yml 檔案

先檢視一下這個檔案

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/"

加上端口号就好了。

自搭gitlab報錯--git operation was rejected by pre-receive hook