gitlab修改root密碼


root用戶下,執行
[root@localhost gitlab]# sudo gitlab-rails console production
-------------------------------------------------------------------------------------
 GitLab:       11.7.3 (3424476)
 GitLab Shell: 8.4.4
 postgresql:   9.6.11
-------------------------------------------------------------------------------------
Loading production environment (Rails 5.0.7.1)
2.獲得用戶數據,修改用戶密碼
irb(main):001:0> u=User.where(id:1).first
=> #<User id:1 @root>
irb(main):003:0> u.password=12345678
=> 12345678
irb(main):004:0> u.password_confirmation=12345678
=> 12345678
irb(main):005:0> u.save!
Enqueued ActionMailer::DeliveryJob (Job ID: 15c3c8de-e839-4874-8104-d72dbe224756) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", #<GlobalID:0x00007f65d5b944d8 @uri=#<URI::GID gid://gitlab/User/1>>
=> true
irb(main):006:0> quit

 

另:gitlab默認用戶名密碼 root   5ivel!fe

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM