forked from gitea/gitea
1
0
Fork 0

Allow ssh-keygen on Windows to detect ssh key type (#14413)

This commit is contained in:
Chester Liu 2021-01-22 04:10:36 +08:00 committed by GitHub
parent c05c0a1512
commit 072d550dda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -223,11 +223,6 @@ func writeTmpKeyFile(content string) (string, error) {
// SSHKeyGenParsePublicKey extracts key type and length using ssh-keygen.
func SSHKeyGenParsePublicKey(key string) (string, int, error) {
// The ssh-keygen in Windows does not print key type, so no need go further.
if setting.IsWindows {
return "", 0, nil
}
tmpName, err := writeTmpKeyFile(key)
if err != nil {
return "", 0, fmt.Errorf("writeTmpKeyFile: %v", err)