diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index c35a7812ad..607c62a6c5 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 63c25d06b6..6b0a927e8f 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 d258c60f57..704baa7572 100644 --- a/templates/repo/bare.tmpl +++ b/templates/repo/bare.tmpl @@ -21,9 +21,11 @@

{{.i18n.Tr "repo.clone_this_repo"}}

- - - + {{if not $.DisableSSH}} + + {{end}} + +

{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}


@@ -34,14 +36,14 @@ git init git add README.md git commit -m "first commit" -git remote add origin {{.CloneLink.SSH}} +git remote add origin {{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}} git push -u origin master

{{.i18n.Tr "repo.push_exist_repo"}}

-
git remote add origin {{.CloneLink.SSH}}
+                        
git remote add origin {{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}
 git push -u origin master