gitlab root 密码忘记了,修改密码

版权声明: https://blog.csdn.net/qq_37143673/article/details/88819364
#进入gitlab控制台
[root@gitlab ~]# gitlab-rails console production
Loading production environment (Rails 4.2.8)

#获取第一个用户,可以看到第一个默认为 root
irb(main):001:0> user = User.where(id:1).first
=> #<User id:1 @root>

#设置新密码
irb(main):002:0> user.password='xxx123456'
=> "xxx123456"

#保存设置
irb(main):003:0> user.save!
Enqueued ActionMailer::DeliveryJob (Job ID: 24cef58c-cc7a-4306-ac2f-d129877fd44e) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1
=> true

猜你喜欢

转载自blog.csdn.net/qq_37143673/article/details/88819364