summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2015-02-07 10:46:57 -0500
committerUnknwon <joe2010xtmf@163.com>2015-02-07 10:46:57 -0500
commit2a2596fe615e4f18e0aff02cc8a016fea0463849 (patch)
treec4a22ca4a195fa4ccdbfee80bae83a1a309548e5 /cmd
parent3f2e99962cd466da2eb09fe4719f258e6f7a39e4 (diff)
downloadgitea-2a2596fe615e4f18e0aff02cc8a016fea0463849.tar.gz
gitea-2a2596fe615e4f18e0aff02cc8a016fea0463849.zip
able to disable SSH for #883
Diffstat (limited to 'cmd')
-rw-r--r--cmd/serve.go6
1 files changed, 6 insertions, 0 deletions
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 {