Have you forgotten your GitLab password? What about your GitLab root user password? Not to worry, I'm going to show you exactly how to do a GitLab reset password operation.
And as this is from the command line, you won't need to have email set up, or remember the email address you registered with.
First up, if you were naughty and didn't change your GitLab default password then try these:
If that works, make changing the root password your immediate next task.
If you have email set up on your GitLab server, the password reset link should see you right.
If you haven't got email set up, or you forgot your root password, then these steps should get you back in:
Start by connecting to your GitLab server via ssh.
Then if you are using the GitLab CE Omnibus Edition:
sudo gitlab-rails console production
Or, if that doesn't work - or you know you installed from source (or, potentially, are using a Docker image):
sudo -u git -H bundle exec rails console production
Then from here, the steps should be the same:
u = User.where(id:1).first u.password = 'your_new_password' u.password_confirmation = 'your_new_password' u.save!
You must update both the
Probably the most important part is getting that exclamation mark in at the end, or this won't work.
After that, you should be good to log back in.
If you know your email address, you can instead change the procedure to:
sudo gitlab-rails console production # or source method, as shown above u = User.find_by(email: 'firstname.lastname@example.org') u.password = 'your_new_password' u.password_confirmation = 'your_new_password' u.save!
And you should be good to go.
If you have found this video helpful, please consider sharing. I really appreciate it.
|1||Zero To GitLab in 5 Minutes||05:02|
|2||Continuously Integrate All The Things||05:10|
|3||GitLab CI Runner Tutorial||03:04|
|4||GitLab Reset Password||01:42|
|5||Updating GitLab and GitLab CI||04:52|
|7||GitLab CI Backup||04:20|
|8||PHP Continuous Integration with GitLab CI||08:08|
|9||How To Use VirtualBox as a GitLab CI Test Runner||06:02|
|10||Running Selenium with Docker During VirtualBox Test Runs||09:02|