diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2017-01-23 20:44:23 -0200 |
---|---|---|
committer | Andrey Nering <andrey.nering@gmail.com> | 2017-01-23 20:44:23 -0200 |
commit | fda44760612aad10e556f65cd201e94ed568fbb3 (patch) | |
tree | 77bd12c1bb292b4ea63166f0d54ddd724df4de7e /modules/ssh | |
parent | 44d4863ecf3d0eb63540f4f10fa2d4760e4daa74 (diff) | |
download | gitea-fda44760612aad10e556f65cd201e94ed568fbb3.tar.gz gitea-fda44760612aad10e556f65cd201e94ed568fbb3.zip |
Fix SSH server on Windows when running as service
Closes #680
Diffstat (limited to 'modules/ssh')
-rw-r--r-- | modules/ssh/ssh.go | 6 |
1 files changed, 5 insertions, 1 deletions
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 { |