From 1cfe5f2339e7f1a2fc7c43c2c67e37bcc2c413fe Mon Sep 17 00:00:00 2001 From: CoenM Date: Mon, 13 Jul 2015 22:23:56 +0200 Subject: [PATCH] Bugfix constructing SSH address with default port --- models/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/repo.go b/models/repo.go index f144be5a3..75c100b74 100644 --- a/models/repo.go +++ b/models/repo.go @@ -247,7 +247,7 @@ func (repo *Repository) CloneLink() (cl CloneLink, err error) { if setting.SSHPort != 22 { cl.SSH = fmt.Sprintf("ssh://%s@%s:%d/%s/%s.git", setting.RunUser, setting.SSHDomain, setting.SSHPort, repo.Owner.LowerName, repo.LowerName) } else { - cl.SSH = fmt.Sprintf("%s@%s:%s/%s.git", setting.RunUser, setting.SSHDomain, repo.Owner.LowerName, repo.LowerName) + cl.SSH = fmt.Sprintf("ssh://%s@%s/%s/%s.git", setting.RunUser, setting.SSHDomain, repo.Owner.LowerName, repo.LowerName) } cl.HTTPS = fmt.Sprintf("%s%s/%s.git", setting.AppUrl, repo.Owner.LowerName, repo.LowerName) return cl, nil