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
Run the below commands for entering into the Gitlab Console
gitlab-rails console production
Wait until the console loaded and you can either find the user for email or username.
user = User.where(id: 1).first
user = User.find_by(email: '[email protected]')
Now Change your password, It’s important to change both passwords
user.password = 'secretpass'
user.password_confirmation = 'secretpass'
Check Out: Step To Install Mariadb 10 Database Server
Don’t forget to save the changes.
You’re done gitlab add user command gitlab root user password change gitlab password