Browse Source

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

tags/v1.15.0-dev
Chester Liu GitHub 4 years ago
parent
commit
9cd12cc734
1 changed files with 0 additions and 5 deletions
  1. +0
    -5
      models/ssh_key.go

+ 0
- 5
models/ssh_key.go 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)


Loading…
Cancel
Save