美文网首页
gitlab-runner报错500修复

gitlab-runner报错500修复

作者: cnwinds | 来源:发表于2023-07-16 10:06 被阅读0次

解决方案

root@txGitlabServer108:/var/log/gitlab/gitlab-rails# gitlab-rails dbconsole
psql (12.7)
Type "help" for help.
 
gitlabhq_production=> UPDATE projects SET runners_token = null, runners_token_encrypted = null;
UPDATE 247
gitlabhq_production=> UPDATE namespaces SET runners_token = null, runners_token_encrypted = null;
UPDATE 91
gitlabhq_production=> 
gitlabhq_production=> 
gitlabhq_production=> UPDATE application_settings SET runners_registration_token_encrypted = null;
UPDATE 1
gitlabhq_production=> UPDATE application_settings SET encrypted_ci_jwt_signing_key = null;
UPDATE 1
gitlabhq_production=> 
gitlabhq_production=> UPDATE ci_runners SET token = null, token_encrypted = null;
UPDATE 0
gitlabhq_production=>

Gitlab is version 14.x gitlab-rails dbconsole无法进去

gitlab-psql -d gitlabhq_production
## Clear project tokens
UPDATE projects SET runners_token = null, runners_token_encrypted = null;
## Clear group tokens
UPDATE namespaces SET runners_token = null, runners_token_encrypted = null;
## Clear instance tokens
UPDATE application_settings SET runners_registration_token_encrypted = null;
## Clear key used for JWT authentication
## This may break the $CI_JWT_TOKEN job variable:
## https://gitlab.com/gitlab-org/gitlab/-/issues/325965
UPDATE application_settings SET encrypted_ci_jwt_signing_key = null;
## Clear runner tokens
UPDATE ci_runners SET token = null, token_encrypted = null;

Gitlab官方文档
https://docs.gitlab.com/ee/raketasks/backup_restore.html#when-the-secrets-file-is-lost

相关文章

网友评论

      本文标题:gitlab-runner报错500修复

      本文链接:https://www.haomeiwen.com/subject/jkgmsdtx.html