Pārlūkot izejas kodu

pkg/ssh: specify ssh-keygen to always generate PEM format

Yoginth 7 gadi atpakaļ
vecāks
revīzija
7f24993f4a
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      pkg/ssh/ssh.go

+ 1 - 1
pkg/ssh/ssh.go

@@ -179,7 +179,7 @@ func Listen(host string, port int, ciphers []string) {
 	keyPath := filepath.Join(setting.AppDataPath, "ssh/gitote.rsa")
 	if !com.IsExist(keyPath) {
 		os.MkdirAll(filepath.Dir(keyPath), os.ModePerm)
-		_, stderr, err := com.ExecCmd(setting.SSH.KeygenPath, "-f", keyPath, "-t", "rsa", "-N", "")
+		_, stderr, err := com.ExecCmd(setting.SSH.KeygenPath, "-f", keyPath, "-t", "rsa", "-m", "PEM", "-N", "")
 		if err != nil {
 			panic(fmt.Sprintf("Fail to generate private key: %v - %s", err, stderr))
 		}