From 4438b7793b143c71675b0ae954036830b7afd2b7 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 25 Feb 2016 00:21:48 -0500 Subject: Add new config option for builtin SSH server Config option [server] SSH_LISTEN_PORT to the port the builtin SSH server will be listen. It can be different from SSH_PORT which is supposed to be exposed in the clone URL. This should solve the problem when user runs Gogs inside Docker container and still want to use builtin SSH server. --- routers/install.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'routers') diff --git a/routers/install.go b/routers/install.go index c65f2629..b2c1d6ea 100644 --- a/routers/install.go +++ b/routers/install.go @@ -89,8 +89,8 @@ func GlobalInit() { checkRunMode() if setting.StartSSHServer { - ssh.Listen(setting.SSHPort) - log.Info("SSH server started on :%v", setting.SSHPort) + ssh.Listen(setting.SSHListenPort) + log.Info("SSH server started on :%v", setting.SSHListenPort) } // Build Sanitizer -- cgit v1.2.3