gitlab web登入密码忘记以后可以用如下方式修改密码
➜ ~ gitlab-rails console production Loading production environment (Rails 4.1.1) irb(main):001:0>
➜ ~ gitlab-rails console production Loading production environment (Rails 4.1.1) irb(main):001:0> user = User.where(id:1).first => #<User id: 1, email: "admin@example.com", encrypted_password: "$2a$10$2/Cgeu8wphCQlk87NVNn6.j.PwC5h3n69ZfqDHexgIO...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 3, current_sign_in_at: "2016-09-08 15:11:18", last_sign_in_at: "2016-09-08 15:07:07", current_sign_in_ip: "127.0.0.1", last_sign_in_ip: "127.0.0.1", created_at: "2016-09-08 10:26:17", updated_at: "2016-09-08 15:11:18", name: "Administrator", admin: true, projects_limit: 10000, skype: "", linkedin: "", twitter: "", authentication_token: "oQchjm_dzv7yfJ7BoE7w", theme_id: 2, bio: nil, failed_attempts: 0, locked_at: nil, extern_uid: nil, provider: nil, username: "root", can_create_group: true, can_create_team: false, state: "active", color_scheme_id: 1, notification_level: 1, password_expires_at: nil, created_by_id: nil, avatar: nil, confirmation_token: nil, confirmed_at: "2016-09-08 10:26:17", confirmation_sent_at: "2016-09-08 10:26:17", unconfirmed_email: nil, hide_no_ssh_key: false, website_url: "", last_credential_check_at: nil> irb(main):002:0>
irb(main):002:0> user.password='66668888' => "66668888"
irb(main):003:0> user.save! => true #成功会反回true
注意管理员是:root(不知道为什么不是admin)
联系方式QQ:326528263 EMAIL:clnking@163.com 网名:bass 分享技术 突破难点 创新思维