Commit db86fe47ce42f8f5aa72cc52d07c7e6eb312dcf9

Authored by Dmitri Moore
1 parent 9b7dd8b4

Add ability to set different ssh host, if different from http/https

config/gitlab.yml.example
... ... @@ -19,6 +19,11 @@ production: &base
19 19 port: 80
20 20 https: false
21 21  
  22 + # Uncommment this line below if your ssh host is different from HTTP/HTTPS one
  23 + # (you'd obviously need to replace ssh.host_example.com with your own host).
  24 + # Otherwise, ssh host will be set to the `host:` value above
  25 + # ssh_host: ssh.host_example.com
  26 +
22 27 # Uncomment and customize the last line to run in a non-root path
23 28 # WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this.
24 29 # Note that four settings need to be changed for this to work.
... ...
config/initializers/1_settings.rb
... ... @@ -117,7 +117,7 @@ Settings.gitlab_shell['hooks_path'] ||= Settings.gitlab['user_home'] + '/gitla
117 117 Settings.gitlab_shell['receive_pack'] = true if Settings.gitlab_shell['receive_pack'].nil?
118 118 Settings.gitlab_shell['upload_pack'] = true if Settings.gitlab_shell['upload_pack'].nil?
119 119 Settings.gitlab_shell['repos_path'] ||= Settings.gitlab['user_home'] + '/repositories/'
120   -Settings.gitlab_shell['ssh_host'] ||= (Settings.gitlab.host || 'localhost')
  120 +Settings.gitlab_shell['ssh_host'] ||= (Settings.gitlab.ssh_host || Settings.gitlab.host || 'localhost')
121 121 Settings.gitlab_shell['ssh_port'] ||= 22
122 122 Settings.gitlab_shell['ssh_user'] ||= Settings.gitlab.user
123 123 Settings.gitlab_shell['owner_group'] ||= Settings.gitlab.user
... ...