Commit e6809117677c104d977e701c256f70ec0ae5da0c
Exists in
spb-stable
and in
2 other branches
Merge pull request #6827 from demisx/master
Add ability to set different ssh host, if different from http/https
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
config/gitlab.yml.example
@@ -19,6 +19,11 @@ production: &base | @@ -19,6 +19,11 @@ production: &base | ||
19 | port: 80 | 19 | port: 80 |
20 | https: false | 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 | # Uncomment and customize the last line to run in a non-root path | 27 | # Uncomment and customize the last line to run in a non-root path |
23 | # WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this. | 28 | # WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this. |
24 | # Note that four settings need to be changed for this to work. | 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,7 +117,7 @@ Settings.gitlab_shell['hooks_path'] ||= Settings.gitlab['user_home'] + '/gitla | ||
117 | Settings.gitlab_shell['receive_pack'] = true if Settings.gitlab_shell['receive_pack'].nil? | 117 | Settings.gitlab_shell['receive_pack'] = true if Settings.gitlab_shell['receive_pack'].nil? |
118 | Settings.gitlab_shell['upload_pack'] = true if Settings.gitlab_shell['upload_pack'].nil? | 118 | Settings.gitlab_shell['upload_pack'] = true if Settings.gitlab_shell['upload_pack'].nil? |
119 | Settings.gitlab_shell['repos_path'] ||= Settings.gitlab['user_home'] + '/repositories/' | 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 | Settings.gitlab_shell['ssh_port'] ||= 22 | 121 | Settings.gitlab_shell['ssh_port'] ||= 22 |
122 | Settings.gitlab_shell['ssh_user'] ||= Settings.gitlab.user | 122 | Settings.gitlab_shell['ssh_user'] ||= Settings.gitlab.user |
123 | Settings.gitlab_shell['owner_group'] ||= Settings.gitlab.user | 123 | Settings.gitlab_shell['owner_group'] ||= Settings.gitlab.user |