diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index 17c8af909..16b287a2c 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -1496,7 +1496,7 @@ The register and sign-in page style .repo-bare #repo-header-meta { display: none; } -.repo-bare #repo-clone-ssh { +.repo-bare .btn-first { margin-left: 200px; } .repo-bare #repo-clone-copy { diff --git a/public/ng/less/gogs/repository.less b/public/ng/less/gogs/repository.less index 63c25d06b..6b0a927e8 100644 --- a/public/ng/less/gogs/repository.less +++ b/public/ng/less/gogs/repository.less @@ -345,7 +345,7 @@ #repo-header-meta { display: none; } - #repo-clone-ssh { + .btn-first { margin-left: 200px; } #repo-clone-copy { diff --git a/templates/repo/bare.tmpl b/templates/repo/bare.tmpl index d258c60f5..704baa757 100644 --- a/templates/repo/bare.tmpl +++ b/templates/repo/bare.tmpl @@ -21,9 +21,11 @@
{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}
git remote add origin {{.CloneLink.SSH}}
+ git remote add origin {{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}
git push -u origin master