• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to change the admin password on GitLab

  • 01:44 cat /etc/os-release
  • 01:59 gitlab-rails console -e production
  • 02:32 u = User.where(id:1).first
  • 03:05 u.password = ' !@#$%^& *'
  • 03:25 u.password_confirmation = ' !@#$%^& *'
  • 03:58 u.save!
  • 04:10 exit
6773

To Change admin password on Gitlab.

Introduction:

Gitlab admin password can be changed easily by using GitLab-rails command. We may have chance of forgetting GitLab admin password, so if we do we actually don’t need to reinstall GitLab just follow the simple steps to reset your GitLab admin password. This tutorial covers the ground on resetting the admin password on Gitlab.

Configuration Steps:

Step 1: To check the os version.

[root@linuxhelp ~]# cat /etc/os-release
NAME=Fedora
VERSION="34 (Workstation Edition)"
ID=fedora
VERSION_ID=34
PLATFORM_ID="platform:f34"
PRETTY_NAME="Fedora 34 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:34"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f34/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=34
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=34
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation

Step 2: To execute this gitlab password rest command.

[root@linuxhelp ~]# gitlab-rails console -e production
--------------------------------------------------------------------------------
 Ruby:         ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux]
 GitLab:       14.4.2 (1ce86e92f81) FOSS
 GitLab Shell: 13.21.1
 PostgreSQL:   12.7
--------------------------------------------------------------------------------
Loading production environment (Rails 6.1.4.1)
irb(main):001:0> u = User.where(id:1).first
=> #<User id:1 @root>
irb(main):002:0> u.password = '!@#$%^&*'
=> "!@\#$%^&*"
irb(main):003:0> u.password_confirmation = '!@#$%^&*'
=> "!@\#$%^&*"
irb(main):004:0> u.save!
Enqueued ActionMailer::MailDeliveryJob (Job ID: 58f04156-cf5e-4d90-aadb-6bae885105d3) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", {:args=>[#<GlobalID:0x00007fe19c8682d0 @uri=#<URI::GID gid://gitlab/User/1>>]}
=> true
irb(main):005:0>exit

Step 3: Then go to the browser search your gitlab and enter login details.

Snap1

Snap2

with This Gitlab admin password reset process comes to an End

Tags:
mason
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

How do I reset my GitLab password?

A

GitLab asks for a username, a password, and a password confirmation. Upon giving proper values for them,
the password of the specified user is updated. To reset the default admin password, run this Rake task with
the username root , which is the default username of that administrator account.

Q

What is GitLab default password?

A

GitLab's administration interface is accessed over the web. Simply point your browser to the hostname or IP address

where GitLab is installed, and log in as an admin user. The default username is Root , and the default password is you can see this location lication "vim /etc/gitlab/initial_root_password"

Q

How do I find my GitLab password?

A

1.Rails console
2.Start a Rails console.
3.Find the user either by username, user ID or email ID: user = User.
4.Reset the password user.
5.When using this method instead of the Users API, GitLab sends an email to the user stating that the user changed their password.
6.Save the changes:

Q

What is GitLab Admin user?

A

The Admin Area provides a web UI to manage and configure some features of GitLab self-managed instances. If you are an administrator,
you can access the Admin Area by visiting /admin on your self-managed instance. ... GitLab versions 14.0 and later: on the top bar, select Menu > Admin.

Q

What is the command for gitlab password change?

A

gitlab-rails console -e production

Related Tutorials in How to change the admin password on GitLab

Related Tutorials in How to change the admin password on GitLab

How to add local folder to a GitLab project
How to add local folder to a GitLab project
Apr 20, 2017
How to reset gitlab admin password
How to reset gitlab admin password
Mar 30, 2017
How to Install and configure GitLab runner on centos 7
How to Install and configure GitLab runner on centos 7
Oct 22, 2021
How to change default backup location in GitLab
How to change default backup location in GitLab
Apr 17, 2017
How to add users to group in GitLab
How to add users to group in GitLab
Feb 15, 2017
How to install Password safe in Ubuntu
How to install Password safe in Ubuntu
Jul 30, 2016
How to Change the Administrator Password in GitLab-CE on CentOS 7.6
How to Change the Administrator Password in GitLab-CE on CentOS 7.6
Aug 3, 2019
How to add SSH key to a GitLab account
How to add SSH key to a GitLab account
Apr 22, 2017

Related Forums in How to change the admin password on GitLab

Related Forums in How to change the admin password on GitLab

gitlab
baseer class=
How to check gitlab version
Oct 24, 2017
Git
vertonskjelvic class=
error: failed to push some refs to in gitlab
Nov 24, 2017
gitlab
caden class=
Insufficient space in download directory /var/cache/yum/x86_64/6/base/packages
Jul 22, 2019
gitlab
brayden class=
GitLab: The project you were looking for could not be found
May 23, 2017
gitlab
ceriaimmaculate class=
Gitlab : how to rename branch name
Oct 26, 2017
Zimbra
kimweasley class=
forgot zimbra admin password
Mar 12, 2018
gitlab
otwol class=
502 Error Whoops Gitlab is Taking too much of time to respond
Jul 29, 2019
gitlab
ajinfernando class=
Gitlab : how to switch remote repository URL from ssh to http
Oct 25, 2017

Related News in How to change the admin password on GitLab

Related News in How to change the admin password on GitLab

Uninstall Blacklisted Extensions With Google's Chrome Admin Policy
Uninstall Blacklisted Extensions With Google's Chrome Admin Policy
Apr 11, 2019
Gitlab assures its users of data recovery post data loss incident
Gitlab assures its users of data recovery post data loss incident
Feb 4, 2017
Nearly 20% of the 1000 Most Popular Docker Containers Have No Root Password
Nearly 20% of the 1000 Most Popular Docker Containers Have No Root Password
May 24, 2019
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Sebastian ?
How to change non required to required field in SuiteCRM Custom/Default Modules

How to change not required to the required field in SuiteCRM Custom/Default Modules?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.