Gitlab用户密码忘记如何修改
作者:互联网
#执行命令
root@d3b78b4b8d24:/# gitlab-rails console
Loading production environment (Rails 4.2.8)
#查找该用户
irb(main):001:0> user = User.where(username: 'root').first
=> #<User id:1 @root>
#修改密码
irb(main):002:0> user.password = '密码长度大于8个字符'
=> "lawrence"
#保存修改
irb(main):003:0> user.save!
Enqueued ActionMailer::DeliveryJob (Job ID: 3add15ae-5e56-45ee-a081-564f397c9897) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/5
=> true
#ctrl+d退出
标签:password,Gitlab,密码,gitlab,user,忘记,main,irb,User 来源: https://www.cnblogs.com/python-xiakaibi/p/12566684.html