From fda44760612aad10e556f65cd201e94ed568fbb3 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Mon, 23 Jan 2017 20:44:23 -0200 Subject: Fix SSH server on Windows when running as service Closes #680 --- modules/ssh/ssh.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/ssh') diff --git a/modules/ssh/ssh.go b/modules/ssh/ssh.go index 056ef084ef..18bac8dbf2 100644 --- a/modules/ssh/ssh.go +++ b/modules/ssh/ssh.go @@ -67,7 +67,11 @@ func handleServerConn(keyID string, chans <-chan ssh.NewChannel) { args := []string{"serv", "key-" + keyID, "--config=" + setting.CustomConf} log.Trace("SSH: Arguments: %v", args) cmd := exec.Command(setting.AppPath, args...) - cmd.Env = append(os.Environ(), "SSH_ORIGINAL_COMMAND="+cmdName) + cmd.Env = append( + os.Environ(), + "SSH_ORIGINAL_COMMAND="+cmdName, + "SKIP_MINWINSVC=1", + ) stdout, err := cmd.StdoutPipe() if err != nil { -- cgit v1.2.3