forgejo/templates/user
Remo Senekowitsch ae785c1aa2 fix: make ssh key verification command more robust (#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)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8821
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-08-11 07:44:27 +02:00
..
auth fix: remove trailing slash from the issuer in oauth claims (#8028) 2025-06-10 20:46:17 +02:00
dashboard fix: PR review dismissals were not appearing in activity feed (#8853) 2025-08-11 07:39:17 +02:00
notification Apply switch redesign to more areas (#6542) 2025-01-13 08:28:06 +00:00
overview feat(UI): add package counter to repo/user/org overview pages 2024-07-31 12:40:24 +02:00
settings fix: make ssh key verification command more robust (#8821) 2025-08-11 07:44:27 +02:00
code.tmpl Unify search boxes (#29530) 2024-03-20 12:31:05 +00:00
heatmap.tmpl Fix heatmap localization 2024-03-20 08:20:08 +01:00
profile.tmpl fix(ui): prepend AppSubURL to visibility hint URLs (#7379) 2025-03-30 05:04:36 +00:00