the clone panel in the repository view has the http (or https if you enabled) as the default active clone method and the there is no options about this in the global app.ini.
The latest Gogs will remember the last clone method you used, this should satisfy most of us
but what if not? Then you should hack into the template files to achieve more config options.
Here is the deal:
Default view (http active by default) like 1 in image:
and we want Gogs select the ssh by default (on new user login or new repo created…) like 2 in image:
Edit /templates/repo/home.tmpl change the value like 3 in image:
then restart Gogs.
Or you want to show only ssh like 4 in image:
apply the corresponding config change like 5 in image:
That’s pretty much it.
Well, I'm not convinced I actually do the right thing since **we are hacking the Gogs internal template file** (always to be bad practice), hence it's going to be an issue when upgrading your Gogs system. **You have to backup and reapply these changes after that.**