blob: 1c8740f6ba9ad847d038a482fce1252d67fcac5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
if ENV['GITLAB_ROOT_PASSWORD'].blank?
password = '5iveL!fe'
expire_time = Time.now
else
password = ENV['GITLAB_ROOT_PASSWORD']
expire_time = nil
end
admin = User.create(
email: "admin@example.com",
name: "Administrator",
username: 'root',
password: password,
password_expires_at: expire_time,
theme_id: Gitlab::Themes::APPLICATION_DEFAULT
)
admin.projects_limit = 10000
admin.admin = true
admin.save!
admin.confirm!
if admin.valid?
puts %Q[
Administrator account created:
login.........root
password......#{password}
]
end
|