gitlab访问项目时报500 OpenSSL::Cipher::CipherError (bad decrypt):

bob_young 发布于 2016/10/11 16:01
阅读 1K+
收藏 0

系统是centos 6.2的 ,gitlab是8.9.5迁移到另外一台服务器上的,其它页面都可以正常显示,但是一点击项目就会显示500(以前的gitlab是用yum安装的,迁移到这台是用rpm安装的,版本都是8.9.5)报错如下


Started GET "/commons/dinpay-commons-springmvc" for 127.0.0.1 at 2016-10-11 01:32:51 +0800
Processing by ProjectsController#show as HTML
  Parameters: {"namespace_id"=>"commons", "id"=>"dinpay-commons-springmvc"}
Completed 500 Internal Server Error in 137ms (ActiveRecord: 8.3ms)


OpenSSL::Cipher::CipherError (bad decrypt):
  app/models/project.rb:456:in `import_url'
  app/models/project.rb:486:in `external_import?'
  app/models/project.rb:478:in `import?'
  app/models/project.rb:494:in `import_in_progress?'
  app/controllers/projects_controller.rb:93:in `show'
  lib/gitlab/middleware/go.rb:16:in `call'

加载中
2
memento1
memento1

是gitlab数据迁移时的一个缺陷。解决方法:

1、覆盖原来gitlab的 db_key_base 到新的gitlab 

db_key_base  位置在 /etc/gitlab/gitlab-secrets.json  

2、EE版本执行
sudo gitlab-rails runner "Project.where(mirror: false).where.not(import_url: nil).each { |p| p.import_data.destroy if p.import_data }"

CE版本执行
sudo gitlab-rails runner "Project.where.not(import_url: nil).each { |p| p.import_data.destroy if p.import_data }"


参考https://gitlab.com/gitlab-org/gitlab-ce/issues/17873

q
qiu
666
返回顶部
顶部