首页 > 其他 > 详细

gitlab忘记密码,怎么办?

时间:2017-01-12 03:29:22      阅读:34      评论:0      收藏:0      [点我收藏+]

标签:gitlab



[[email protected] etc]# 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: "[email protected]", created_at: "2017-01-06 07:47:39", updated_at: "2017-01-11 07:25:07", name: "Administrator", admin: true, projects_limit: 10, skype: "", linkedin: "", twitter: "", authentication_token: "EujTJzBxtoGNRCFf1enZ", theme_id: 2, bio: nil, username: "root", 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: "[email protected]", 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>

irb(main):002:0> user = root.where(id: 1).first

NameError: undefined local variable or method `root‘ for main:Object

from (irb):2

from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/console.rb:110:in `start‘

from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/console.rb:9:in `start‘

from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:68:in `console‘

from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!‘

from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands.rb:17:in `<top (required)>‘

from bin/rails:9:in `require‘

from bin/rails:9:in `<main>‘

irb(main):003:0> user.password=12345678

=> 12345678

irb(main):004:0> user.password_confirmation=12345678

=> 12345678

irb(main):005:0> user.save!

Enqueued ActionMailer::DeliveryJob (Job ID: b5ff06b5-930e-4f72-927e-9280ea98a02e) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1

=> true

irb(main):006:0> quit




本文出自 “LINUX_Home” 博客,请务必保留此出处http://dmwing.blog.51cto.com/11607397/1891093

gitlab忘记密码,怎么办?

标签:gitlab

原文:http://dmwing.blog.51cto.com/11607397/1891093

(0)
(0)
   
举报
评论 一句话评论(0
0条  
登录后才能评论!
© 2014 bubuko.com 版权所有 鲁ICP备09046678号-4
打开技术之扣,分享程序人生!
             

鲁公网安备 37021202000002号