Ads Top

How to reset gitlab root password

Login in your server with root access, then start ruby on rail consol and login.

Start Rubi consol using below command : 

gitlab-rails console production

Wait until the console has loaded, you can search for email or username.
user = User.where(id: 1).first
user = User.find_by(email: '')

You can change your password from below commands :

user.password = 'secret_pass'
user.password_confirmation = 'secret_pass'

It’s important that you change both password and password_confirmation to make it work.
Don’t forget to save the changes.!
Exit the console and try to login with your new password.

No comments:

'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + ''; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();
© 2020 Vishal Vyas. All rights reserved. Theme images by Jason Morrow. Powered by Blogger.