Description
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
Activity
zeripath commentedon 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:
gitea/templates/repo/clone_buttons.tmpl
Line 29 in c21735b
gitea/web_src/js/features/repo-common.js
Line 53 in 19b017f
gitea/web_src/js/features/repo-common.js
Line 61 in 19b017f
Should mean it becomes the default for you all the time.
wxiaoguang commentedon 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 commentedon 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 commentedon 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 commentedon Mar 29, 2022
@zeripath we can use this PR to find JS errors as early as possible.