forgejo/templates/user/settings
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
..
security fix(ui): 2fa verify alignment (#7159) 2025-03-08 14:19:36 +00:00
account.tmpl Rework user profile settings 2024-12-30 16:42:58 +01:00
actions.tmpl
appearance.tmpl feat(ui): localize theme names (#7168) 2025-03-09 15:12:30 +00:00
applications.tmpl chore(ui): improve svg icon margin consistency (#7172) 2025-03-09 15:05:34 +00:00
applications_oauth2.tmpl
applications_oauth2_edit.tmpl
applications_oauth2_edit_form.tmpl Fix checkbox field markup (#30666) 2024-04-28 15:39:01 +02:00
applications_oauth2_list.tmpl Fix inconsistent required field (#3583) 2024-05-01 18:29:42 +00:00
blocked_users.tmpl
grants_oauth2.tmpl [PORT] Refactor DateUtils and merge TimeSince (gitea#32409) 2024-11-10 22:23:27 +01:00
hook_new.tmpl
hooks.tmpl
keys.tmpl Allow options to disable user ssh keys configuration from the interface on app.ini (#29447) 2024-03-11 23:36:57 +07:00
keys_gpg.tmpl fix: vertical center the date on GPG keys 2024-11-17 21:53:37 +01:00
keys_principal.tmpl [PORT] Refactor DateUtils and merge TimeSince (gitea#32409) 2024-11-10 22:23:27 +01:00
keys_ssh.tmpl [v12.0/forgejo] fix: make ssh key verification command more robust (#8860) 2025-08-11 14:06:50 +02:00
layout_footer.tmpl
layout_head.tmpl
navbar.tmpl feat(ui): add quota overview (#6602) 2025-02-26 14:36:53 +00:00
organization.tmpl Refactor Safe modifier (#29392) 2024-02-26 22:30:27 +01:00
packages.tmpl feat(ui): improve description in packages settings (#7531) 2025-04-18 12:36:59 +00:00
packages_cleanup_rules_edit.tmpl
packages_cleanup_rules_preview.tmpl
profile.tmpl feat(ui): show size constraints of custom avatar (#7998) 2025-06-14 16:35:50 +02:00
repos.tmpl Remove fomantic list module (#30281) 2024-04-07 15:40:31 +02:00
runner_edit.tmpl
storage_overview.tmpl feat(ui): add quota overview (#6602) 2025-02-26 14:36:53 +00:00