diff options
author | Patrick Bajao <ebajao@gitlab.com> | 2019-08-23 08:57:22 +0300 |
---|---|---|
committer | Patrick Bajao <ebajao@gitlab.com> | 2019-08-29 11:33:04 +0300 |
commit | 95ffd22f07d821f223388bd60a287365d3b7d8f6 (patch) | |
tree | f33b472d1863afe8905ee95ce12e1a061e828652 /config | |
parent | c08191e0d5565fd191f4dec54520994ea473ea8d (diff) |
Set default authorized_keys_file
This is the same as gitlab-shell's default. This is to ensure
that it's always set.
It needs to be the same as gitlab-shell's default because we
don't set a default value in omnibus-gitlab. If users don't
set the value of that config in their install and they upgraded,
we must ensure that it's still going to point to the same
authorized keys file.
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/1_settings.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 81433b620bc..4160f488a7a 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -515,7 +515,7 @@ Settings['sidekiq']['log_format'] ||= 'default' Settings['gitlab_shell'] ||= Settingslogic.new({}) Settings.gitlab_shell['path'] = Settings.absolute(Settings.gitlab_shell['path'] || Settings.gitlab['user_home'] + '/gitlab-shell/') Settings.gitlab_shell['hooks_path'] = :deprecated_use_gitlab_shell_path_instead -Settings.gitlab_shell['authorized_keys_file'] ||= nil +Settings.gitlab_shell['authorized_keys_file'] ||= File.join(Dir.home, '.ssh', 'authorized_keys') Settings.gitlab_shell['secret_file'] ||= Rails.root.join('.gitlab_shell_secret') Settings.gitlab_shell['receive_pack'] = true if Settings.gitlab_shell['receive_pack'].nil? Settings.gitlab_shell['upload_pack'] = true if Settings.gitlab_shell['upload_pack'].nil? |