How to reset Gitlab admin password using Rake Task on Ubuntu 21.04

To Reset Gitlab Admin Password Using Rake Task on Ubuntu 21.04

Introduction

Gitlab is a Devops tool that manages Git repositories through a web interface. Rake is a popular task runner for Ruby, and it is a software task management and builds automation tool.

Installation Procedure:

Step1: Log in on to the Gitlab

Step2: Show the invalid login password

Step3: Check the OS version by using the following command

linuxhelp@linuxhelp:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 21.04
Release:	21.04
Codename:	hirsute

Step4: Logon to the root user by using the following command

linuxhelp@linuxhelp:~$ sudo -s
[sudo] password for linuxhelp: 

Step5: Change to the Home directory by using the following command

root@linuxhelp:/home/linuxhelp# cd ~

Step6: Reset the Admin user password by using the following command

root@linuxhelp:~# gitlab-rake "gitlab:password:reset"
Enter username: root
Enter password: 
Confirm password: 
Password successfully updated for user with username root.

Step7: Enter the new password and Confirmation password

Step8: Login again with new password after reset

Step9: Account logged in and Password change reflected successfully

By this reset Gitlab admin password using Rake Task on Ubuntu 21.04 has been completed

Tag : gitlab Ubuntu
FAQ
Q
How to list all Tasks?
A
Use "rake -T" command to list all Tasks.
Q
What is the extension of a rake task file?
A
The extension of a rake task file is ".rake"
Q
Where are Rake tasks defined?
A
User-defined rake tasks are located inside the lib/tasks folder.
Q
How to run Rake task?
A
To run a rake task, just call the rake command with the name of your task
Q
What is a Rake task?
A
Rake is a popular task runner in Ruby.