summaryrefslogtreecommitdiffstats
path: root/models/ssh_key.go
diff options
context:
space:
mode:
authorChester Liu <skyline75489@outlook.com>2021-01-22 04:10:36 +0800
committerGitHub <noreply@github.com>2021-01-21 21:10:36 +0100
commit072d550dda791463af61a40fc08bdfdd3f8a7caa (patch)
tree6ed504f7d8cbabafbc80d916045b0451f765c830 /models/ssh_key.go
parentc05c0a1512f0a69320fbb7b2c2757848b465cfbe (diff)
downloadgitea-072d550dda791463af61a40fc08bdfdd3f8a7caa.tar.gz
gitea-072d550dda791463af61a40fc08bdfdd3f8a7caa.zip
Allow ssh-keygen on Windows to detect ssh key type (#14413)
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r--models/ssh_key.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go
index bb75b656c4..c4a6df89a1 100644
--- a/models/ssh_key.go
+++ b/models/ssh_key.go
@@ -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)