Commit 745f262c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'root_password_configurable' into 'master'

Root password configurable through environmental variable

Fixes #1522

See merge request !1084
parents d7ab859b 09e64ae6
password = if ENV['GITLAB_ROOT_PASSWORD'].nil? || ENV['GITLAB_ROOT_PASSWORD'].empty?
"5iveL!fe"
else
ENV['GITLAB_ROOT_PASSWORD']
end
admin = User.create( admin = User.create(
email: "admin@example.com", email: "admin@example.com",
name: "Administrator", name: "Administrator",
username: 'root', username: 'root',
password: "5iveL!fe", password: password,
password_confirmation: "5iveL!fe", password_confirmation: password,
password_expires_at: Time.now, password_expires_at: Time.now,
theme_id: Gitlab::Theme::MARS theme_id: Gitlab::Theme::MARS
...@@ -19,6 +25,6 @@ puts %q[ ...@@ -19,6 +25,6 @@ puts %q[
Administrator account created: Administrator account created:
login.........root login.........root
password......5iveL!fe password......#{password}
] ]
end end
...@@ -244,6 +244,10 @@ GitLab Shell is an SSH access and repository management software developed speci ...@@ -244,6 +244,10 @@ GitLab Shell is an SSH access and repository management software developed speci
# When done you see 'Administrator account created:' # When done you see 'Administrator account created:'
**Note:** You can set the Administrator password by supplying it in environmental variable `GITLAB_ROOT_PASSWORD`, eg.:
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=newpassword
### Install Init Script ### Install Init Script
Download the init script (will be `/etc/init.d/gitlab`): Download the init script (will be `/etc/init.d/gitlab`):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment