gitlab 忘记用户密码
0 1 2 3 4 5 6 7 8 9 10 |
[root@www ~]# gitlab-rails console production Loading production environment (Rails 4.2.7.1) irb(main):001:0> user = User.where(id:1).first => #<User id: 1, email: "admin@example.com", created_at: "2017-04-28 01:40:03", updated_at: "2018-01-11 05:42:09", name: "admin", admin: true, projects_limit: 10, skype: "", linkedin: "", twitter: "", authentication_token: "xxxxxx", theme_id: 2, bio: nil, username: "admin", can_create_group: true, can_create_team: false, state: "active", color_scheme_id: 1, password_expires_at: nil, created_by_id: nil, last_credential_check_at: nil, avatar: nil, hide_no_ssh_key: false, website_url: "", notification_email: "admin@example.com", hide_no_password: false, password_automatically_set: false, location: nil, encrypted_otp_secret: nil, encrypted_otp_secret_iv: nil, encrypted_otp_secret_salt: nil, otp_required_for_login: false, otp_backup_codes: nil, public_email: "", dashboard: 0, project_view: 0, consumed_timestep: nil, layout: 0, hide_project_limit: false, otp_grace_period_started_at: nil, ldap_email: false, external: false, organization: nil, incoming_email_token: "xxxx", authorized_projects_populated: true> irb(main):002:0> user.password='123456' => "123456" irb(main):003:0> user.save! Enqueued ActionMailer::DeliveryJob (Job ID: 4f26891d-2b38-462d-a707-fa990195928b) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1 => true irb(main):004:0> user.save! => true |
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!