gitlab改root密码
1.
~$ sudo gitlab-rails console production
2.查询要改的用户
irb(main):008:0> u = User.where(id: 1).first => #<User id:1 @root>
3.重置密码
irb(main):009:0> u.password = '12345678'
4.确认密码
irb(main):009:0> u.password_confirmation = '12345678'
5.保存修改,注意加感叹号!
irb(main):009:0> u.save!
Enqueued ActionMailer::DeliveryJob (Job ID: 604c82da-008a-4f4e-9f3d-794bb0fffc5b) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now",
gid://gitlab/User/1=> true