gitlab runner 500错误解决

gitlab runner 500错误解决

    • 错误信息为:
    • 解决方法:

错误信息为:

Completed 500 Internal Server Error in 175ms (ActiveRecord: 10.2ms)

ActionView::Template::Error ():
    37:
    38:     .col-sm-6
    39:       .bs-callout
    40:         = render partial: 'ci/runner/how_to_setup_runner',
    41:                  locals: { registration_token: Gitlab::CurrentSettings.runners_registration_token,
    42:                            type: 'shared',
    43:                            reset_token_url: reset_registration_token_admin_application_settings_path }

lib/gitlab/crypto_helper.rb:27:in `aes256_gcm_decrypt'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:55:in `get_token'
app/models/concerns/token_authenticatable_strategies/base.rb:33:in `ensure_token!'
app/models/concerns/token_authenticatable.rb:43:in `block in add_authentication_token_field'

解决方法:

参考文档
https://stackoverflow.com/questions/54128023/gitlab-500-errors-in-the-admin-area/54136240#54136240_
https://github.com/sameersbn/docker-gitlab/issues/929

cd /home/git/gitlab/gitlab

#进入gitlab rails
sudo -u git -H bundle exec rails console production
#执行命令
ApplicationSetting.current.reset_runners_registration_token!


#如下
root@ca2da70f7978:/home/git/gitlab# sudo -u git -H bundle exec rails console production
-------------------------------------------------------------------------------------
 GitLab:       11.8.7 (75f677309a)
 GitLab Shell: 8.4.4
 postgresql:   9.4.21
-------------------------------------------------------------------------------------
Loading production environment (Rails 5.0.7.1)
irb(main):001:0> 
irb(main):002:0> 
irb(main):003:0>  ApplicationSetting.current.reset_runners_registration_token!
=> true
irb(main):004:0> exit

# omnibus 版本应使用如下命令
gitlab-rails console production

你可能感兴趣的:(gitlab)