forgejo/templates
forgejo-backport-action 97a27bb096 [v12.0/forgejo] fix: make ssh key verification command more robust (#8860)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/8821

This is a follow-up to a13414341b.

There are two situations where the previous verification command could
fail:

* The user has an SSH key in a normal file, but no running SSH agent.

* The user uses a special SSH agent, but it's not specified via the
  SSH_AUTH_SOCK variable.

To fix that, we provide two separate commands to copy-paste. One
for file-based keys and one for agent-based keys. People using
file-based keys with a path other than the standard `~/.ssh/id_ed25519`
should notice themselves what to change. People using an SSH agent
get a little hint to make sure the SSH_AUTH_SOCK variable is set.

See also:
https://codeberg.org/Codeberg/Community/issues/2066

(no test or documentation changes)

### 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

* `pr=8821 ; 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/7350cbe5-4a78-47a7-821f-575dd0a43e0e)

* run the command matching your setup (file-based SSH key or agent-provided one), 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-->
- Bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/8821): <!--number 8821 --><!--line 0 --><!--description bWFrZSBzc2gga2V5IHZlcmlmaWNhdGlvbiBjb21tYW5kIG1vcmUgcm9idXN0-->make ssh key verification command more robust<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Remo Senekowitsch <remo@buenzli.dev>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8860
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-08-11 14:06:50 +02:00
..
admin feat(ui): show size constraints of custom avatar (#7998) 2025-06-14 16:35:50 +02:00
api/packages/pypi Update templates/api/packages/pypi/simple.tmpl 2024-04-12 16:43:30 +00:00
base feat(ui): redesign user profile actions layout (#7906) 2025-06-24 14:16:51 +02:00
custom [FEAT] Repository flags 2024-02-05 16:09:42 +01:00
devtest chore(ui): clean up hashbox CSS, small design changes (#7822) 2025-05-25 12:51:27 +02: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 [v12.0/forgejo] fix(email): actions notification template confuses branch with PR (#8455) 2025-07-09 10:20:54 +02:00
moderation feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
org feat(ui): show size constraints of custom avatar (#7998) 2025-06-14 16:35:50 +02:00
package [v12.0/forgejo] several fixes of ALT Package registry (#8480) 2025-07-10 21:57:46 +02:00
projects fix(ui): use gap in switch items (#7581) 2025-04-21 04:25:08 +00:00
repo [v12.0/forgejo] fix(ui): move file rename notice to before pagination (#8852) 2025-08-10 22:19:25 +02:00
shared feat(ui): redesign user profile actions layout (#7906) 2025-06-24 14:16:51 +02:00
status ui: improve error pages (#7274) 2025-03-28 19:50:43 +00:00
swagger [v12.0/forgejo] Revert "feat: remove API authentication methods that uses the URL query (#7924)" (#8653) 2025-07-24 17:53:11 +02:00
user [v12.0/forgejo] fix: make ssh key verification command more robust (#8860) 2025-08-11 14:06:50 +02:00
webhook Actions Failure, Succes, Recover Webhooks (#7508) 2025-06-03 14:29:19 +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