Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Start a Ruby on Rails console with this command:

Code Block
themeEclipseEmacs
gitlab-rails console production

...

There are multiple ways to find your user. You can search for email or username.

Code Block
themeEclipseEmacs
user = User.where(id: 1).first


Or


Code Block
themeEclipseEmacs
user = User.find_by(email: 'admin@example.com')

...

Now you can change your password:

Code Block
themeEclipseEmacs
user.password = 'secret_pass'
user.password_confirmation = 'secret_pass'

...

Don’t forget to save the changes.

Code Block
themeEclipseEmacs
user.save!


Exit the console and try to login with your new password.