enhancement: add additional command hints for PowerShell & CMD (#33548)

- resolving wrong signature calculations for SSH key verification

Fixed #22693

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
jason19970210 2025-02-11 04:14:37 +08:00 committed by GitHub
parent 30993e9508
commit e3adb686bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,7 +78,16 @@
<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>{{printf "echo -n '%s' | ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey" $.TokenToSign}}</code></p> <p><code>echo -n '{{$.TokenToSign}}' | ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey</code></p>
<details>
<summary>Windows PowerShell</summary>
<p><code>cmd /c "&lt;NUL set /p=`"{{$.TokenToSign}}`"| ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey"</code></p>
</details>
<br>
<details>
<summary>Windows CMD</summary>
<p><code>set /p={{$.TokenToSign}}| ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey</code></p>
</details>
</div> </div>
<br> <br>
</div> </div>