summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/initializers/1_settings.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 27bb83784ba..d7af4e10cdc 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -13,7 +13,11 @@ class Settings < Settingslogic
if gitlab_shell.ssh_port != 22
"ssh://#{gitlab_shell.ssh_user}@#{gitlab_shell.ssh_host}:#{gitlab_shell.ssh_port}/"
else
- "#{gitlab_shell.ssh_user}@#{gitlab_shell.ssh_host}:"
+ if gitlab_shell.ssh_host.include? ':'
+ "[#{gitlab_shell.ssh_user}@#{gitlab_shell.ssh_host}]:"
+ else
+ "#{gitlab_shell.ssh_user}@#{gitlab_shell.ssh_host}:"
+ end
end
end