YC Yc.W home Systems · C++ · AI Infrastructure
DevOps & Infrastructure · Note

GitLab 重置数据库,修复 server 迁移 token 异常

Explore all DevOps & Infrastructure notes →

迁移gitlab的server数据之后,导致token异常 影响:修改工程配置信息,提交时页面报错502

sudo gitlab-rails dbconsole --database main
DELETE FROM ci_group_variables;
DELETE FROM ci_variables;
UPDATE projects SET runners_token = null,runners_token_encrypted = null;
UPDATE namespaces SET runners_token = null,runners_token_encrypted = null;
UPDATE application_settings SET runners_registration_token_encrypted = null;
UPDATE application_settings SET encrypted_ci_jwt_signing_key = null;
UPDATE ci_runners SET token = null,token_encrypted = null;


sudo gitlab-rails console -e production
ApplicationSetting.first.delete
ApplicationSetting.first

← Previous CMake CPack

Next → OpenMP