Own gitlab report --git operation was rejected by pre-receive hook

After compiling the gitlab source code and building the Chinese version of gitlab, it suddenly cannot be submitted. The gitlab service is working normally, but when a new library file is created, an error is reported when gitclone. Using gitlab itself also reported an error.
Error git operation was rejected by pre-receive hook



accidentally found a command to check whether gitlab is complete
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.


It can be seen from the log that I have a problem with gitlab-shell and let me change the /home/git/gitlab-shell/config.yml file. Check this file

first
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"
say again:
  bin: "/usr/bin/redis-cli"
  namespace: resque:gitlab
  socket: "/var/run/redis/redis.sock"
log_level: INFO
audit_usernames: false


GitLab has two configuration files for setting IP or domain name:
1. GitLab's: /home/git/gitlab/config/gitlab.yml
2. GitLab-Shell's: /home/git/gitlab-shell/config.yml
Put the two The IP or domain name of the configuration file can be corrected. In the configuration file of GitLab-Shell, if the domain name has a port number, also write the port number. For example, mine is gitlab_url: "http://gitlab.xxxx.xxxx.com:8088/"
plus the port number.



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326277830&siteId=291194637