Gitlab升级遇到的问题

初始的Gitlab版本为13.6.7,准备升级到最新版本。ps.这个版本的Git有漏洞,天天被植入木马,被折磨的够呛,没办法只能升级

遇到的问题
13.6.7 ---> 13.8.8 遇到的问题

问题1. gitlab-ctl reconfigure报错
Running handlers:
There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 55) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash"  "/tmp/chef-script20221114-958287-a1ins6" ----
STDOUT: rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
       Is the server running locally and accepting
       connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"?
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:58:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:db:configure
(See full trace by running task with --trace)
STDERR: 
---- End output of "bash"  "/tmp/chef-script20221114-958287-a1ins6" ----
Ran "bash"  "/tmp/chef-script20221114-958287-a1ins6" returned 1

解决办法:

sudo chmod 755 /var/opt/gitlab/postgresql
sudo systemctl restart gitlab-runsvdir
-- 然后再执行
gitlab-ctl reconfigure

参考:https://www.likecs.com/show-203346724.html

问题2. root账号登录不了,提示 Invalid Login or password.

不知道什么原因,升级到13.8.8 版本后,root账号登录不上了,其他账号可正常登录。没办法只能想办法了修改密码了

  1. 使用gitlab-rails console 命令进入gitlab提供的命令行控制环境
gitlab-rails console
  1. 定位到root账号
user = User.where(id: 1).first
  1. 为这个root用户设置新的密码password
user.password = 'youpassword'
  1. 强制保存设置
user.save!

参考:https://www.csdn.net/tags/Mtzacg3sNDQxNy1ibG9n.html

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容