无法重置gitlab的root密码

时间:2015-11-28 21:33:40

标签: gitlab

我在VM上安装了gitlab。初始安装后我能够重置root密码。在那之后,我无法重新登录(我可能输入了错误的密码并被锁定)。我使用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>

1 个答案:

答案 0 :(得分:1)

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