From 2a2596fe615e4f18e0aff02cc8a016fea0463849 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 7 Feb 2015 10:46:57 -0500 Subject: able to disable SSH for #883 --- cmd/serve.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd') diff --git a/cmd/serve.go b/cmd/serve.go index 2390962342..1f5d944d4f 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -33,6 +33,12 @@ var CmdServ = cli.Command{ func setup(logPath string) { setting.NewConfigContext() log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath)) + + if setting.DisableSSH { + println("Gogs: SSH has been disabled") + os.Exit(1) + } + models.LoadModelsConfig() if models.UseSQLite3 { -- cgit v1.2.3