Reset GitLab root Password in Linux

  • Post author:
  • Post category:Linux
  • Post last modified:August 17, 2023

you must be an administrator of a self-managed instance. there are several methods to reset gitlab root password but we will use Rake Task method. Here’s a step-by-step guide on how to reset the GitLab ee root password:

Step 1:

  • Connect to the server where GitLab is installed via SSH or physical access to reset GitaLab password.
  • Once logged in, open a terminal or command prompt.
  • Stop the GitLab service by following command.

sudo gitlab-ctl stop

Step 2:

  • Enter the following command to rest password :

sudo gitlab-rake ‘gitlab:password:reset[root]’

  • Now, now system will prompt to enter new password and confirm password.

Enter Password: ‘new_password’
Confirm Password:

Reset Gitlab password

Step 3:

  • Start the GitLab service again. On Ubuntu, you can use the following command:

sudo gitlab-ctl start

  • The GitLab root password has now been reset. You can log in to GitLab using the new password.

Remember to keep the new password secure and follow any additional security measures recommended by GitLab for your instance.

Read More Topics:

How to Downgrade Gitlab Server from to A step by step Guide.

Step-by-Step Guide: Migrating Your GitLab Server Backup to a New Serve

Leave a Reply