环境
| K | V |
|---|---|
| centos | 7.4 |
| docker | 19.03.5 |
| gitlab-ce | gitlab/gitlab-ce 11.9.8-ce.0 |
在作者修复前的已知服务端响应500的操作
- CI/DI 菜单
- Remove Project
- Outbound requests
- 其他未知菜单…
方法一
方法一 没有解决我的问题 我执行时提示有语法错误
root@192:/etc/gitlab# gitlab-rails db
psql (9.6.11)
Type "help" for help.
gitlabhq_production=> p = Project.find_by_full_path('deliverGroup/csjmall')
gitlabhq_production=> p.variables.each(&:destroy)
gitlabhq_production=> SELECT name, runners_token_encrypted FROM Projects WHERE Name = 'csjmall';
方法二
方法二 没有解决我的问题
注意备份文件后再执行命令
root@192:/etc/gitlab# gitlab-rails db
psql (9.6.11)
Type "help" for help.
gitlabhq_production=> Ci::Runner.all.update_all(token_encrypted: nil)
方法三
方法三 解决了我的遇到问题
上面两种方法尝试均无效后,才建议使用此方法。
方法三会重置相关CI的所有密钥和token,谨慎!
-- 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;
举个栗子:
root@192:/etc/gitlab# gitlab-rails db
psql (9.6.11)
Type "help" for help.
gitlabhq_production=> UPDATE projects SET runners_token = null, runners_token_encrypted = null;
UPDATE 45
gitlabhq_production=> UPDATE namespaces SET runners_token = null, runners_token_encrypted = null;
UPDATE 15
gitlabhq_production=> UPDATE application_settings SET runners_registration_token_encrypted = null;
UPDATE 1
gitlabhq_production=>
本文详细介绍了在CentOS 7.4环境下,使用Docker 19.03.5和GitLab CE 11.9.8时,遇到CI/DI菜单、RemoveProject等操作导致的500服务端响应错误的三种解决方案。方法三通过重置CI密钥和token成功解决问题,但需谨慎操作。
875

被折叠的 条评论
为什么被折叠?



