-
-
Save sykezz/2333f3528196307e30e1b481634cc70f to your computer and use it in GitHub Desktop.
How to reset admin password in gitlab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# logon at your gitlab server | |
# | |
# $ sudo gitlab-rails console production | |
Loading production environment (Rails 4.2.7.1) | |
irb(main):001:0> user = User.where(id: 1).first | |
=> #< USER ADMIN > | |
irb(main):002:0> user.password = 'my_new_pass' | |
irb(main):003:0> user.password_confirmation = 'my_new_pass' | |
=> "my_new_pass" | |
irb(main):004:0> user.save! | |
Enqueued ActionMailer::DeliveryJob (Job ID: a-fancy-alphanumerical-id ) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1 | |
=> true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment