Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitlab重置root密码 #161

Open
jeffsui opened this issue Feb 10, 2022 · 0 comments
Open

gitlab重置root密码 #161

jeffsui opened this issue Feb 10, 2022 · 0 comments
Labels

Comments

@jeffsui
Copy link
Owner

jeffsui commented Feb 10, 2022

一、重置密码
1、切换到相应路径

cd /opt/gitlab/bin/
2、进入控制台

gitlab-rails console
3、查询root用户账号信息并赋值给u

u=User.find(1)
4、设置密码

root用户密码设置为root123456

u.password='root123456'
5、确认密码(非必须)

u.password_confirmation = 'root123456'
6、保存设置

u.save!
7、退出控制台
exit
8、重启gitlab服务
gitlab-ctl restart

@jeffsui jeffsui added the gitlab label Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant