无法重置gitlab的根密码

无法重置gitlab的根密码,gitlab,Gitlab,我在虚拟机上安装了gitlab。我能够在初次安装后重置根密码。在那之后,我无法重新登录(我可能输入了错误的密码并被锁定)。我使用gitlab控制台重置密码: sudo gitlab-rails console production user = User.where(id: 1).first user.password = 'secret_pass' user.password_confirmation = 'secret_pass' user.save! 我指定了新密码来代替“秘密密

我在虚拟机上安装了gitlab。我能够在初次安装后重置根密码。在那之后,我无法重新登录(我可能输入了错误的密码并被锁定)。我使用gitlab控制台重置密码:

sudo gitlab-rails console production    
user = User.where(id: 1).first
user.password = 'secret_pass'
user.password_confirmation = 'secret_pass'
user.save!
我指定了新密码来代替“秘密密码”。我在控制台上没有看到任何错误。但是,我仍然无法以root用户身份登录。关于如何排除/解决此问题,您有何想法? 谢谢

来自命令提示符的用户信息

   #<User id: 1, email: "xxx@hotmail.com", 
encrypted_password:"$2a$10$EUlyzuDG77Ux1uFyBJ6GNOydZsCGljb77eqmy7yVlvt..., reset_password_token: nil, 
reset_password_sent_at: nil, 
remember_created_at: nil, 
sign_in_count: 2, 
current_sign_in_at: "2015-11-28 19:30:26", 
last_sign_in_at: "2015-11-28 19:29:39", 
current_sign_in_ip: "xxx.xxx.xxx.xxx", 
last_sign_in_ip: "xxx.xxx.xxx.xxx", 
created_at: "2015-11-28 19:19:26", updated_at: "2015-11-28 23:42:59", name: "Administrator", 
admin: true, 
projects_limit: 10000, 
skype: "", 
linkedin: "", 
twitter: "", 
authentication_token: "7sx3z9waLg28vnssoTe1", 
theme_id: 2, 
bio: nil, 
failed_attempts: 0, 
locked_at: 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, 
last_credential_check_at: nil, 
avatar: nil, 
confirmation_token: "kdzR4DZ9jb5CsvRkx_7K", 
confirmed_at: "2015-11-28 19:19:27", 
confirmation_sent_at: "2015-11-28 19:19:27", 
unconfirmed_email: nil, 
hide_no_ssh_key: false, 
website_url: "", 
notification_email: "xxx@hotmail.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>

#问题在于服务器的DNS设置,但浏览器中的错误消息以及我为gitlab检查的任何日志都不清楚这一点

您在尝试以root用户身份登录之前是否退出了控制台?是-它就是不起作用。我在这件事上浪费了太多时间。我已经尝试使用“root”用户名和我附加的电子邮件ID。这两种方法都不适用于修改后的密码。我想知道用户名逻辑是否以某种方式依赖于域名。你有没有可能打印出
User.where(id:1)。首先
:这会让用户名在这里使用。将它添加到原始注释中-在旁注中,我真的打赌你会找到它。几年前你帮我问了另一个gitolite问题