zoukankan      html  css  js  c++  java
  • 重置Docker里的gitlab管理员用户密码

    1.docker ps  找出容器的唯一标识

    2.docker exec -it ad9b8c3e20f0 /bin/bash  进入Docker容器运行环境

    3.开始重置gitlab管理员用户密码

    root@47:/# gitlab-rails console production
    Loading production environment (Rails 4.2.10)
    irb(main):001:0> user=User.where(id:1).first
    => #<User id:1 @root>
    irb(main):002:0> user.password='123456'
    => "123456"
    irb(main):003:0> user.password_confirmation='123456'
    => "123456"
    irb(main):004:0> user.save!
    Enqueued ActionMailer::DeliveryJob (Job ID: 86227e1d-cc49-44de-9179-e7c20a8b03f6) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1
    => true
    irb(main):005:0> 
    

    4.至此,管理员用户名重置完毕,重置后的密码为123456

  • 相关阅读:
    Hadoop(1.2.1)安装
    ETL,BPM与ESB三者的一些感悟
    编程上面的理论支撑
    TreeSet类的排序
    List接口
    Map接口
    类和对象
    面向对象1
    IO流4
    Java面向对象
  • 原文地址:https://www.cnblogs.com/boboblue/p/12033909.html
Copyright © 2011-2022 走看看