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

 

相关文章:

  • 2022-12-23
  • 2021-12-09
  • 2021-04-03
  • 2021-06-04
  • 2021-11-24
  • 2021-09-05
  • 2021-09-25
猜你喜欢
  • 2022-01-17
  • 2022-12-23
  • 2021-07-26
  • 2021-07-09
  • 2021-10-05
  • 2022-01-05
  • 2021-08-22
相关资源
相似解决方案