gitlab修改root密码
在root用户下,执行
[root@localhost ~]# gitlab-rails console production ------------------------------------------------------------------------------------- GitLab: 11.0.4 (edb037c) GitLab Shell: 7.1.4 postgresql: 9.6.8 ------------------------------------------------------------------------------------- Loading production environment (Rails 4.2.10)
<em id="__mceDel">2.获得用户数据,修改用户密码</em>
irb(main):001:0> irb(main):002:0* user = User.where(id: 1).first => #<User id:1 @root> irb(main):003:0> user.password = 12345678 => 12345678 irb(main):004:0> user.password_confirmation = 12345678 => 12345678 irb(main):005:0> user.save! Enqueued ActionMailer::DeliveryJob (Job ID: 0be0d09b-0be2-4edf-be6f-b0c7d5c92e83) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1 => true irb(main):006:0> quit
另:gitlab默认用户名密码 root 5ivel!fe