【异常】gitlab error: failed to push some refs to
1 错误信息
remote: hooks/pre-receive:14:in `require_relative': cannot load such file -- /var/opt/gitlab/git-data/repositories/talkilla/talkilla.git/lib/gitlab_custom_hook (LoadError)
remote: from hooks/pre-receive:14:in `<main>'
To new.gitlab.jiushiyaokuaile.cn:talkilla/talkilla.git
! [remote rejected] hotfix/20210914 -> hotfix/20210914 (pre-receive hook declined)
error: failed to push some refs to 'git@new.gitlab.jiushiyaokuaile.cn:talkilla/talkilla.git'
2 错误原因是自己迁移gitlab copy代码的时候失去了 hooks文件的软连接,重新再代码的git目录下软连接一下hooks文件解决问题
ln -s /opt/gitlab/embedded/service/gitlab-shell/hooks hooks
chown -R git:git hooks