Gitlab初始化管理员账户
Posted ypf5208
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Gitlab初始化管理员账户相关的知识,希望对你有一定的参考价值。
基础环境:
系统:centos8.1
gitlab版本:13.0.5
在已经成功安装完gitlab后,第一步需要初始化gitlab的管理员账户,具体操作如下:
[root@web1 ~]# gitlab-rails console -e production ------------------------------------------------------------------------------------- Gitlab: 13.0.5 (2268d0cdfcds) FOSS Gitlab Shell: 13.2.0 postgresql: 11.7 ------------------------------------------------------------------------------------- Loading production environment (Rails 6.0.3) irb(main):001:0> user = User.where(id: 1).first => #<User id:1 @root> irb(main):002:0> user.password="admin12345678" => "admin12345678" irb(main):003:0> user.password_confirmation=“admin12345678" => "admin12345678" irb(main):004:0> user.save! Enqueued ActionMailer::DeliveryJob (Job ID: 3ef37c47-4b3f-49e5-aa53-904e725bd1a8) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", gid://gitlab/User/1 => true irb(main):005:0> quit