mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-21 14:39:23 +00:00
feat: inline public ssh key in verification command
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.
This commit is contained in:
parent
eb3feaad45
commit
4e4862a427
1 changed files with 6 additions and 1 deletions
|
@ -78,7 +78,12 @@
|
||||||
<input readonly="" value="{{$.TokenToSign}}">
|
<input readonly="" value="{{$.TokenToSign}}">
|
||||||
<div class="help">
|
<div class="help">
|
||||||
<p>{{ctx.Locale.Tr "settings.ssh_token_help"}}</p>
|
<p>{{ctx.Locale.Tr "settings.ssh_token_help"}}</p>
|
||||||
<p><code>echo -n '{{$.TokenToSign}}' | ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey</code></p>
|
<p><code>echo -n '{{$.TokenToSign}}' | ssh-keygen -Y sign -n gitea -f <(echo "{{.Content}}")</code></p>
|
||||||
|
<details>
|
||||||
|
<summary>Fish shell</summary>
|
||||||
|
<p><code>echo -n '{{$.TokenToSign}}' | ssh-keygen -Y sign -n gitea -f (echo "{{.Content}}" | psub)</code></p>
|
||||||
|
</details>
|
||||||
|
<br>
|
||||||
<details>
|
<details>
|
||||||
<summary>Windows PowerShell</summary>
|
<summary>Windows PowerShell</summary>
|
||||||
<p><code>cmd /c "<NUL set /p=`"{{$.TokenToSign}}`"| ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey"</code></p>
|
<p><code>cmd /c "<NUL set /p=`"{{$.TokenToSign}}`"| ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey"</code></p>
|
||||||
|
|
Loading…
Add table
Reference in a new issue