Please revert gidelines to create repo to use ssh origin link instead of http #8748

Closed
opened 2025-11-02 08:16:22 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @chmike on GitHub (Mar 24, 2022).

Description

I have just installed the latest version of gitea

Version: 1.16.5 built with GNU Make 4.1, go1.18 : bindata, sqlite, sqlite_unlock_notify

The guide lines to create the repository shown just after the repository has been created in gitea show now the HTTPS remote url. It was previously showing the SSH url.

This is inconvenient when we use SSH as the default access. Is it possible to revert or display the alternative with SSH ?
It is convenient to copy past in the git command. Otherwise I need construct the command by getting the SSH path.

With SSH I can use public key authentication and don't need to give my password. This is also needed when using a smart shell prompt that shows git status relative to origin.

Screenshots

touch README.md
git init

git add README.md
git commit -m "first commit"
git remote add origin https://gitea.xxx.xxx/xxx/demo.git
git push -u origin master

Gitea Version

1.16.5

Can you reproduce the bug on the Gitea demo site?

No

Operating System

Debian buster (release 10)

Browser Version

Not relevant

Originally created by @chmike on GitHub (Mar 24, 2022). ### Description I have just installed the latest version of gitea ``` Version: 1.16.5 built with GNU Make 4.1, go1.18 : bindata, sqlite, sqlite_unlock_notify ``` The guide lines to create the repository shown just after the repository has been created in gitea show now the HTTPS remote url. It was previously showing the SSH url. This is inconvenient when we use SSH as the default access. Is it possible to revert or display the alternative with SSH ? It is convenient to copy past in the git command. Otherwise I need construct the command by getting the SSH path. With SSH I can use public key authentication and don't need to give my password. This is also needed when using a smart shell prompt that shows git status relative to origin. ### Screenshots touch README.md git init git add README.md git commit -m "first commit" git remote add origin https://gitea.xxx.xxx/xxx/demo.git git push -u origin master ### Gitea Version 1.16.5 ### Can you reproduce the bug on the Gitea demo site? No ### Operating System Debian buster (release 10) ### Browser Version Not relevant
GiteaMirror added the topic/uitype/bug labels 2025-11-02 08:16:22 -06:00
Author
Owner

@zeripath commented on GitHub (Mar 24, 2022):

Honestly I give up.

There seems to be no possible way of solving this page to everyone's satisfaction.

gitea embedded extract repo/empty.tmpl and change the template.

However if you click the ssh button once then:

c21735b49a/templates/repo/clone_buttons.tmpl (L29)

19b017f398/web_src/js/features/repo-common.js (L53)

19b017f398/web_src/js/features/repo-common.js (L61)

Should mean it becomes the default for you all the time.

@zeripath commented on GitHub (Mar 24, 2022): Honestly I give up. There seems to be no possible way of solving this page to everyone's satisfaction. `gitea embedded extract repo/empty.tmpl` and change the template. However if you click the ssh button once then: https://github.com/go-gitea/gitea/blob/c21735b49a5dd8ab6a2f8f6085d650dcfb411fad/templates/repo/clone_buttons.tmpl#L29 https://github.com/go-gitea/gitea/blob/19b017f3986655468d72b383141256f11d58c186/web_src/js/features/repo-common.js#L53 https://github.com/go-gitea/gitea/blob/19b017f3986655468d72b383141256f11d58c186/web_src/js/features/repo-common.js#L61 Should mean it becomes the default for you all the time.
Author
Owner

@wxiaoguang commented on GitHub (Mar 25, 2022):

And I found a bug in the empty page, caused by last PR.

I will propose a refactoring about clone buttons to make them clear.

@wxiaoguang commented on GitHub (Mar 25, 2022): And I found a bug in the empty page, caused by last PR. I will propose a refactoring about clone buttons to make them clear.
Author
Owner

@wxiaoguang commented on GitHub (Mar 25, 2022):

There is a JS error when visiting an empty repo page, which causes the clone-urls can not be updated by local storage.

Fix PR:

@wxiaoguang commented on GitHub (Mar 25, 2022): There is a JS error when visiting an empty repo page, which causes the clone-urls can not be updated by local storage. Fix PR: * https://github.com/go-gitea/gitea/pull/19208
Author
Owner

@wxiaoguang commented on GitHub (Mar 25, 2022):

And the fix for 1.16

Without the fix, even if user have chosen ssh, on the new empty repo page, the URL is still https, because the JS can not run correctly.

@wxiaoguang commented on GitHub (Mar 25, 2022): And the fix for 1.16 * https://github.com/go-gitea/gitea/pull/19209 Without the fix, even if user have chosen `ssh`, on the new empty repo page, the URL is still https, because the JS can not run correctly.
Author
Owner

@wxiaoguang commented on GitHub (Mar 29, 2022):

@zeripath we can use this PR to find JS errors as early as possible.

@wxiaoguang commented on GitHub (Mar 29, 2022): @zeripath we can use this PR to find JS errors as early as possible. * https://github.com/go-gitea/gitea/pull/18971
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8748