• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Change the Administrator Password in GitLab-CE on CentOS 7.6

  • 00:58 head -1 /opt/gitlab/version-manifest.txt
  • 01:09 gitlab-rails console production
  • 01:20 u=User.where(id:1).first
  • 01:35 u.password='lucky@abcd'
  • 01:42 u.password_confirmation='lucky@abcd'
  • 01:44 u.save!
  • 01:53 gitlab-ctl reconfigure
{{postValue.id}}

Change the Administrator Password In GitLab-CE On CentOS 7.6

Password Reset Process:

Verify the version of Gitlab-CE through the below command

[root@linuxhelp ~]# head -1 /opt/gitlab/version-manifest.txt
gitlab-ce 12.0.3

Login to the Gitlab Console using rails and reset the password as follows

[root@linuxhelp ~]# gitlab-rails console production
-------------------------------------------------------------------------------------
 GitLab:       12.0.3 (08a51a9db93)
 GitLab Shell: 9.3.0
 PostgreSQL:   10.7
-------------------------------------------------------------------------------------
Loading production environment (Rails 5.1.7)
irb(main):003:0> u=User.where(id:1).first
=> #<User id:1 @root>
irb(main):007:0> u.password='lucky@abcd'
=> "lucky@abcd"
irb(main):012:0> u.password_confirmation='lucky@abcd'
=> "lucky@abcd"
irb(main):016:0> u.save!
Enqueued ActionMailer::DeliveryJob (Job ID: 3b3610d9-d5eb-49f9-94b6-0b6ca6eab403) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", #<GlobalID:0x00007f299c110b80 @uri=#<URI::GID gid://gitlab/User/1>>
=> true
irb(main):020:0> exit

Reconfigure the Gitlab to update the changes

[root@linuxhelp ~]# gitlab-ctl reconfigure
Starting Chef Client, version 13.6.4
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
  - gitlab (0.0.1)
  - package (0.1.0)
  - postgresql (0.1.0)
  - redis (0.1.0)
  - registry (0.1.0)
  - mattermost (0.1.0)
  - consul (0.1.0)
  - gitaly (0.1.0)
  - nginx (0.1.0)
  - runit (4.3.0)
  - acme (3.1.0)
  - crond (0.1.0)
  - letsencrypt (0.1.0)
  - compat_resource (12.19.1)
Installing Cookbook Gems:
Compiling Cookbooks...
.
.
.
.
.

Running handlers:
Running handlers complete
Chef Client finished, 2/665 resources updated in 44 seconds
gitlab Reconfigured!

Open your browser and enter the Gitlab Account URL Snap (1) Log in to the Gitlab Account with the reset password Snap (2) Snap (3) With this. Administrator password has been changed In Gitlab-CE 12.0.3 Version on CentOS 7.6

Tags:
adhitiroy
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What does IRB stand for while changing the Administrators password In Gitlab-CE 12.0.3

A

irb stands for Interactive ruby while changing the Administrators password in Gitlab-CE 12.0.3

Q

What is irb in Gitlab-rails console?

A

irb is an interactive ruby shell Which is a REPL in Gitlab-rails console

Q

What is the difference between Ruby and ruby on rails in Gitlab?

A

Ruby is a programming language whereas ruby On rails is a web framework in Gitlab

Q

What is the command to change the password of an administrator in gitlab using rails console?

A

The command to change the password of the administrator in Gitlab using rails console is u.password='$password' where $password is the password that you would like to change.

Q

How will you save the password while changing the administrator password in gitlab rails console?

A

u.save! is the command to save the password while changing the administrator password in gitlab rails console.

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 Lucas ?
Various options in Top command

Am using Top command only to view the load average, what are the various options in Top command..??

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.