...
Start a Ruby on Rails console with this command:
Code Block | ||
---|---|---|
| ||
gitlab-rails console production |
...
There are multiple ways to find your user. You can search for email or username.
Code Block | ||
---|---|---|
| ||
user = User.where(id: 1).first |
Or
Code Block | ||
---|---|---|
| ||
user = User.find_by(email: 'admin@example.com') |
...
Now you can change your password:
Code Block | ||
---|---|---|
| ||
user.password = 'secret_pass' user.password_confirmation = 'secret_pass' |
...
Don’t forget to save the changes.
Code Block | ||
---|---|---|
| ||
user.save! |
Exit the console and try to login with your new password.