Gitlab reset Password for root is not coming directly it is giving login option can you help to how to reset password of administration
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Is it a GitLab Enterprise Edition that you are running on your Droplet? If so what you could do is to use the Rails console to reset your GitLab user password as described in the docs here:
https://docs.gitlab.com/ee/administration/operations/rails_console.html
Basically, you will need to do the following:
SSH into your Droplet where GitLab is installed.
ssh [your-user]@[your-droplet-ip-address]
Open the GitLab Rails console. If you installed GitLab via the Omnibus package, you can open the Rails console with:
sudo gitlab-rails console
Locate the root user and change the password. Once in the console, enter the following commands:
user = User.where(id: 1).first
user.password = 'new-password-here'
user.password_confirmation = 'new-password-here'
user.save!
Exit the Rails console by simply typing:
exit
Now, go to your GitLab login page and use root as the username and the new password you just set to log in.
If you have two-factor authentication (2FA) enabled, and you also lost access to it, you can disable it from the Rails console:
user = User.where(id: 1).first
user.two_factor_enabled = false
user.save!
Let me know how it goes!
Best,
Bobby
Heya,
I’ll also point you in direction to use the rails console to reset your password. You can follow the steps Bobby listed and also check this article in Gitlab’s docs:
https://docs.gitlab.com/ee/security/reset_user_password.html
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.