奇妙伞 Good Luck To You!

gitlab重置root密码

1. 进入gitlab程序目录

[root@Gitlab ~]# cd /opt/gitlab/bin

2. 修改密码

[root@Gitlab bin]# gitlab-rails console production

-------------------------------------------------------------------------------------

 GitLab:       11.8.0 (ce13864)

 GitLab Shell: 8.4.4

 postgresql:   9.6.11

-------------------------------------------------------------------------------------

Loading production environment (Rails 5.0.7.1)

irb(main):001:0> user=User.where(id:1).first

=> #<User id:1 @root>

irb(main):002:0> user.password='12345678'

=> "12345678"

irb(main):003:0> user.password_confirmation='12345678'

=> "12345678"

irb(main):004:0> user.save!

Enqueued ActionMailer::DeliveryJob (Job ID: e869b6e1-23e8-4f0c-8471-172eff545f44) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", #<GlobalID:0x00007f5c02508d58 @uri=#<URI::GID gid://gitlab/User/1>>

=> true

irb(main):005:0>exit

[root@Gitlab bin]#

----------至此修改结束,可以正常登陆-----------



除特别注明外,本站所有文章均为奇妙伞原创,转载请注明出处来自https://www.qm3.com.cn/post/310.html

标签: gitlab密码root

作者:David 分类:软件安装配置 浏览:3282 评论:0
留言列表
发表评论
来宾的头像