GitLab [error] gitlab archive 500 error

问题描述

gitlab archive 500 error

在gitlab管理平台中对一个项目做归档操作,页面返回500错误,归档失败。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

问题分析

我们在gitlab服务器终端开启一个会话,同步刷着日志,然后再次尝试,看看报什么错

[root@localhost ~]# gitlab-ctl tail

截取部分日志内容

==> /var/log/gitlab/puma/puma_stderr.log <==

==> /var/log/gitlab/puma/current <==

==> /var/log/gitlab/puma/state <==

==> /var/log/gitlab/gitlab-rails/production.log <==

.....
Completed 500 Internal Server Error in 86ms (ActiveRecord: 10.9ms | Elasticsearch: 0.0ms | Allocations: 17292)
......
OpenSSL::Cipher::CipherError ():
lib/gitlab/crypto_helper.rb:28:in `aes256_gcm_decrypt'
app/models/concerns/token_authenticatable_strategies/encryption_helper.rb:18:in `decrypt_token'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:45:in `get_token'
app/models/concerns/token_authenticatable_strategies/base.rb:32:in `ensure_token'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:32:in `ensure_token'
app/models/concerns/token_authenticatable.rb:43:in `block in add_authentication_token_field'

发现了问题:
与gitlab的encrypt(加密)和decrypt(解密)有关,GitLab对项目无法解密造成。

解决方法

运行如下命令

[root@localhost nginx]# gitlab-rails c
--------------------------------------------------------------------------------
 Ruby:         ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux]
 GitLab:       14.4.1 (1a23d731c9f) FOSS
 GitLab Shell: 13.21.1
 PostgreSQL:   12.7
--------------------------------------------------------------------------------

irb(main):001:0> Project.find_by_full_path('**/**/**/').update(runners_token: nil, runners_token_encrypted:nil)
=> true

注:括号中的是你的项目地址,至于是几级目录(不一定是这三级目录哦),请自行修改

运行完成,返回true,再次进行归档操作,成功。



GitLab Issues 参考:https://gitlab.com/gitlab-org/gitlab/-/issues/35258

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值