一介闲人
一介闲人
GitLab的默认管理员账号是root
通过GitLab安装服务器里面的执行文件进行密码修改
## 进入安装目录下的执行目录
cd /opt/gitlab/bin
## gitlab-rails控制台
[root@localhost bin]# ./gitlab-rails console
--------------------------------------------------------------------------------
GitLab: 12.4.0 (1425a56c75b)
GitLab Shell: 10.2.0
PostgreSQL: 10.9
--------------------------------------------------------------------------------
Loading production environment (Rails 5.2.3)
irb(main):001:0>
irb(main):002:0> user = User.where(username:'root').first
=> #<User id:1 @root>
irb(main):003:0> user.password='root'
=> "root"
irb(main):004:0> user.password_confirmation='root'
=> "root"
irb(main):005:0> user.save!
Traceback (most recent call last):
1: from (irb):5
ActiveRecord::RecordInvalid (Validation failed: Password is too short (minimum is 8 characters))
irb(main):006:0> user.password='Root@123456'
=> "Root@123456"
irb(main):007:0> user.password_confirmation='Root@123456'
=> "Root@123456"
irb(main):008:0> user.save!
Enqueued ActionMailer::DeliveryJob (Job ID: b92b1594-9067-4639-a45c-70da43a69aed) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", #<GlobalID:0x00007fc776abfa78 @uri=#<URI::GID gid://gitlab/User/1>>
=> true
irb(main):009:0> quit
[root@localhost bin]#
评论