Skip to content

Commit e3adb68

Browse files
jason19970210wxiaoguangGiteaBot
authored
enhancement: add additional command hints for PowerShell & CMD (#33548)
- resolving wrong signature calculations for SSH key verification Fixed #22693 --------- Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: Giteabot <[email protected]>
1 parent 30993e9 commit e3adb68

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

templates/user/settings/keys_ssh.tmpl

+10-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,16 @@
7878
<input readonly="" value="{{$.TokenToSign}}">
7979
<div class="help">
8080
<p>{{ctx.Locale.Tr "settings.ssh_token_help"}}</p>
81-
<p><code>{{printf "echo -n '%s' | ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey" $.TokenToSign}}</code></p>
81+
<p><code>echo -n '{{$.TokenToSign}}' | ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey</code></p>
82+
<details>
83+
<summary>Windows PowerShell</summary>
84+
<p><code>cmd /c "&lt;NUL set /p=`"{{$.TokenToSign}}`"| ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey"</code></p>
85+
</details>
86+
<br>
87+
<details>
88+
<summary>Windows CMD</summary>
89+
<p><code>set /p={{$.TokenToSign}}| ssh-keygen -Y sign -n gitea -f /path_to_PrivateKey_or_RelatedPublicKey</code></p>
90+
</details>
8291
</div>
8392
<br>
8493
</div>

0 commit comments

Comments
 (0)