解决方案
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