diff options
author | Unknwon <u@gogs.io> | 2017-02-14 18:08:26 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-02-14 18:08:26 -0500 |
commit | e24d62e5831d26ccc7ff55600f8ff5826c8a3afd (patch) | |
tree | cd324a1162dd36c1d7cc840995b7b858152bfb0e /modules/ssh | |
parent | 0386b5ae540b2a86d201db8135684075a26bc5fe (diff) |
modules/ssh: SSH_KEYGEN_PATH not used for exec ssh-keygen (#4124)
Diffstat (limited to 'modules/ssh')
-rw-r--r-- | modules/ssh/ssh.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/ssh/ssh.go b/modules/ssh/ssh.go index bdb58469..1b95e3bc 100644 --- a/modules/ssh/ssh.go +++ b/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)) } |