From 0ed4ae7295ef1cf5d3a63be64315738a19a178b1 Mon Sep 17 00:00:00 2001 From: "Christian E. Hopps" Date: Sun, 14 Dec 2014 21:01:02 -0500 Subject: [PATCH] Add []s around user@ipv6addr (e.g., "[git@::1]/repo.git") --- config/initializers/1_settings.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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