forgejo/templates
Remo Senekowitsch a13414341b feat: inline public ssh key in verification command (#7516)
This makes it easier for people to verify their SSH key with various
setups. People with a key stored in a file won't have to manually
substitute the correct file path anymore. People who store their SSH
key in a password manager and access it via an ssh-agent won't have
to copy the private key to a temporary file or figure out the process
substitution thing anymore.

A slight disadvantage is that the fish shell doesn't have the same
syntax for process substitution as POSIX shells. For that reason, a
default-collapsed box with a custom command for fish users is provided,
just like for the Windows shells.

The Windows shells do not have an equivalent to process substitution, so
those commands remain unchanged.

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [ ] ~in their respective `*_test.go` for unit tests.~
  - [ ] ~in the `tests/integration` directory if it involves interactions with a live Forgejo server.~
- I added test coverage for JavaScript changes...
  - [ ] ~in `web_src/js/*.test.js` if it can be unit tested.~
  - [ ] ~in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).~

### Documentation

- [ ] ~I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.~
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

## [](#testing)Testing

* `pr=7516 ; git fetch forgejo +refs/pull/$pr/head:refs/heads/wip-pr-$pr`

* `git checkout wip-pr-$pr`

* `make TAGS='sqlite sqlite_unlock_notify' watch`

* login

* visit /user/settings/keys and add an ssh key

* click verify

* see a CLI sample is displayed
      ![image](attachments/8edf43f4-9ae9-48dc-b275-0c466e9a161d)

* run CLI sample, copy paste the output and submit it

* check that the verification is successful
      ![image](attachments/20074f32-e06f-42fd-9732-32171016c47e)

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- User Interface features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/7516): <!--number 7516 --><!--line 0 --><!--description aW5saW5lIHB1YmxpYyBzc2gga2V5IGluIHZlcmlmaWNhdGlvbiBjb21tYW5k-->inline public ssh key in verification command<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7516
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Remo Senekowitsch <remo@buenzli.dev>
Co-committed-by: Remo Senekowitsch <remo@buenzli.dev>
2025-04-17 05:00:21 +00:00
..
admin fix(i18n): fix several usages of i18n (#7422) 2025-04-02 14:50:02 +00:00
api/packages/pypi Update templates/api/packages/pypi/simple.tmpl 2024-04-12 16:43:30 +00:00
base feat(ui): make JS asset load error message translatable (#7388) 2025-04-01 16:14:38 +00:00
custom [FEAT] Repository flags 2024-02-05 16:09:42 +01:00
devtest ui: improve error pages (#7274) 2025-03-28 19:50:43 +00:00
explore ui: simplify main-attribute labels 2024-12-08 17:30:52 +05:00
htmx Update module github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker to v3 2024-08-09 21:03:37 +02:00
mail Merge pull request '[SEC] Notify owner about TOTP enrollment' (#4704) from gusted/sec-more-totp into forgejo 2024-07-27 20:53:47 +00:00
org fix(ui): add header to org settings / blocked users page (#7101) 2025-03-02 13:11:57 +00:00
package Alt Linux Apt-Rpm repository support for Forgejo packages. (#6351) 2025-01-22 14:01:49 +00:00
projects fix(ui): improve milestone/project header consistency (#7174) 2025-03-09 16:24:52 +00:00
repo feat: sync forks (#2364) 2025-04-07 07:00:38 +00:00
shared fix(ui): ensure consistent switch position in markdown editor (#7492) 2025-04-09 17:37:46 +00:00
status ui: improve error pages (#7274) 2025-03-28 19:50:43 +00:00
swagger feat(sec): Add SSH signing support for instances (#6897) 2025-04-11 13:25:35 +00:00
user feat: inline public ssh key in verification command (#7516) 2025-04-17 05:00:21 +00:00
webhook fix: improve discord webhook api conformance 2024-10-08 22:43:28 +02:00
home.tmpl Split Forgejo landing page template to allow patching or removing Forgejo introduction section (#6675) 2025-02-03 08:41:52 +00:00
home_forgejo.tmpl Split Forgejo landing page template to allow patching or removing Forgejo introduction section (#6675) 2025-02-03 08:41:52 +00:00
install.tmpl Added alt's to <img> 2025-01-31 21:22:00 +00:00
post-install.tmpl [BRANDING] Custom loading animation for Forgejo 2024-02-05 16:02:13 +01:00