How To Reset Gitlab

How To Reset Gitlab Root, If you want to reset or forgot the root password, So it can be recovered on Gitlab Server. Once you integrated GitLab with Active directory, So there won’t add any admin user created. You can change the GitLab password and add an admin user in GitLab using the add-user command and also change the GitLab root user password. so

You need to make a GitLab admin user manually, you can choose an existing user to make an admin for GitLab server.

How To Reset Gitlab Root Password:

The best Open Source Version control system is Gitlab Server. I have already authenticated a user in the GitLab server using AD Server. 

Gitlab Is an Open Source Version control system where you can use this for your code commit, changes, and push to a repository.

Check Out:  Change Gitlab IP URL With Hostname

Let’s Begin

Run the below commands for entering into the Gitlab Console

gitlab-rails console production

change gitlab password

Wait until the console loaded and you can either find the user for email or username.

user = User.where(id: 1).first

Or

user = User.find_by(email: '[email protected]')

gitlab add admin user

Check Out: Make Admin User After Authentication Gitlab With AD

Now Change your password, It’s important to change both passwords

user.password = 'secretpass'
user.password_confirmation = 'secretpass'

gitlab add user command

Check Out: Step To Install Mariadb 10 Database Server

Don’t forget to save the changes.

user.save!

 git user

You’re done gitlab add user command gitlab root user password change gitlab password

LEAVE A REPLY

Please enter your comment!
Please enter your name here