Today, GitLab push suddenly reports an error:
Git push origin issue_232
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 348 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
Remote: hooks/update: 10: in 'require _ relative ': cannot load such file --/home/git/repositories/test-project.git/lib/gitlab_update (LoadError)
Remote: from hooks/update: 10: in '<main>'
Remote: error: hook declined to update refs/heads/issue_232
To git@gitlab.cmltechnology.cn: CRF/jiangshu-sports-lottery.git
! [Remote rejected] issue_232-> issue_232 (hook declined)
The reason is that gitlab has just been migrated to another server. After comparing the results, we found that the old gitlab server is correct.
/Home/git/repositories/test-project.git/hooks/update file is a link that points
Update->/home/git/gitlab-shell/hooks/update
Therefore, manually delete the file and add Link
Rm update
Ln-s/home/git/gitlab-shell/hooks/update
In this way, the directory to be searched becomes gitlab-shell, and files can be found naturally.
Once you restart gitlab, update becomes a file, and push returns an error again. In the future, write a script to start post-processing.
Read more: GitLab 5.3 upgrade notes
GitLab details: click here
GitLab: click here