How To Reset Gitlab

How To Reset Gitlab Root Password

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 gitlab password and add an admin user in gitlab using the add user command and also change gitlab root user password. so

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

The best Open Source Version control system is Gitlab Server. I have already authenticated a user in 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: ‘admin@local.host‘)

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

Rate this article

Leave a Reply

avatar
  Subscribe  
Notify of