【Amadeus原创】本地安装gitlab,初始化管理员密码
注册还是无法登录,最后发现,需要初始化root密码。
docker exec进去,然后执行gitLab-rails,修改密码,
然后登录即可。
[root@ecs-9684 ~]# docker exec -it gitlab bash
root@d0b25b714247:/# gitlab-rails console -------------------------------------------------------------------------------- Ruby: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
GitLab: 14.1.2 (8c67b499146) FOSS
GitLab Shell: 13.19.1 PostgreSQL: 12.6
-------------------------------------------------------------------------------- Loading production environment (Rails 6.1.3.2)
irb(main):001:0> u=User.where(id:1).first => #<User id:1 @root> irb(main):002:0> u.password='Piwei123'
=> "Liwei123" irb(main):003:0> u.password_confirmation='Piwei123'
=> "Liwei123" irb(main):004:0> u.save! Enqueued ActionMailer::MailDeliveryJob (Job ID: 734aff11-5c77-485d-879c-b21292d57c7d) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", {:args=>[#<GlobalID:0x00007fbc8a880bf0 @uri=#<URI::GID gid://gitlab/User/1>>]}
=> true irb(main):005:0>
用root登录,即可。