gitlab docker 忘记root密码,重新设置
创始人
2024-06-02 20:41:25

在 Ubuntu 上安装 gitlab docker ,非常简单方便;

安装方法:GitLab Docker images | GitLab

根据提示,可以直到 root 的默认密码在: /srv/gitlab/config/initial_root_password

一般保存一下这个文件;# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.

根据 这个文件,可以知道,如果 root 密码忘记可以到这里查看处理;

# WARNING: This value is valid only in the following conditions

# 1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).

# 2. Password hasn't been changed manually, either via UI or via command line.

#

# If the password shown here doesn't work, you must reset the admin password following

这里说明了一般密码重置的方法;

https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.

这里说明一下:

在 通过 docker 安装 gitlab,重新设置 root 密码方法:

1: sudo docker ps -a //查看 gitlab docker id;

2: docker exec -it gitlabContainerId /bin/bash //https://docs.gitlab.com/ee/administration/operations/rails_console.html

3: gitlab-rails console -e production // 等待启动,一个Ruby 表格;

4:user.password = 't12345678' //必须 字母 和 数组组合,大于8,否则保持错误;

5:user.password = '12345678'

6:user.password_confirmation = 't12345678'

7: user.save! //如果成功,提示 true, 否则提示 false,需要查看具体问题;

相关内容

热门资讯

苗族的传统节日 贵州苗族节日有... 【岜沙苗族芦笙节】岜沙,苗语叫“分送”,距从江县城7.5公里,是世界上最崇拜树木并以树为神的枪手部落...
长白山自助游攻略 吉林长白山游... 昨天介绍了西坡的景点详细请看链接:一个人的旅行,据说能看到长白山天池全凭运气,您的运气如何?今日介绍...
北京的名胜古迹 北京最著名的景... 北京从元代开始,逐渐走上帝国首都的道路,先是成为大辽朝五大首都之一的南京城,随着金灭辽,金代从海陵王...
应用未安装解决办法 平板应用未... ---IT小技术,每天Get一个小技能!一、前言描述苹果IPad2居然不能安装怎么办?与此IPad不...