diff --git a/models/repo.go b/models/repo.go index 998914d5b..8546bffc6 100644 --- a/models/repo.go +++ b/models/repo.go @@ -615,13 +615,14 @@ func (repo *Repository) cloneLink(isWiki bool) *CloneLink { if isWiki { repoName += ".wiki" } + repoLowerName := strings.ToLower(repoName) repo.Owner = repo.MustOwner() cl := new(CloneLink) if setting.SSH.Port != 22 { - cl.SSH = fmt.Sprintf("ssh://%s@%s:%d/%s/%s.git", setting.RunUser, setting.SSH.Domain, setting.SSH.Port, repo.Owner.Name, repoName) + cl.SSH = fmt.Sprintf("ssh://%s@%s:%d/%s/%s.git", setting.RunUser, setting.SSH.Domain, setting.SSH.Port, repo.Owner.Name, repoLowerName) } else { - cl.SSH = fmt.Sprintf("%s@%s:%s/%s.git", setting.RunUser, setting.SSH.Domain, repo.Owner.Name, repoName) + cl.SSH = fmt.Sprintf("%s@%s:%s/%s.git", setting.RunUser, setting.SSH.Domain, repo.Owner.Name, repoLowerName) } cl.HTTPS = ComposeHTTPSCloneURL(repo.Owner.Name, repoName) return cl