From 605a38759fe226b0f2541c72275caf1af234860f Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 11 May 2014 12:17:10 -0400 Subject: Fix #94 and fix #169 --- modules/middleware/repo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/middleware/repo.go') diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 1516482167..ff99f82897 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -153,11 +153,11 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner ctx.Data["BranchName"] = "" - sshPrefix := "" if base.SshPort != 22 { - sshPrefix = "ssh://" + ctx.Repo.CloneLink.SSH = fmt.Sprintf("ssh://%s@%s/%s/%s.git", base.RunUser, base.Domain, user.LowerName, repo.LowerName) + } else { + ctx.Repo.CloneLink.SSH = fmt.Sprintf("%s@%s:%s/%s.git", base.RunUser, base.Domain, user.LowerName, repo.LowerName) } - ctx.Repo.CloneLink.SSH = fmt.Sprintf("%s%s@%s:%s/%s.git", sshPrefix, base.RunUser, base.Domain, user.LowerName, repo.LowerName) ctx.Repo.CloneLink.HTTPS = fmt.Sprintf("%s%s/%s.git", base.AppUrl, user.LowerName, repo.LowerName) ctx.Data["CloneLink"] = ctx.Repo.CloneLink -- cgit v1.2.3