소스 검색

modules/ssh: SSH_KEYGEN_PATH not used for exec ssh-keygen (#4124)

Unknwon 8 년 전
부모
커밋
e24d62e583
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/ssh/ssh.go

+ 1 - 1
modules/ssh/ssh.go

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