diff options
author | Unknwon <joe2010xtmf@163.com> | 2015-02-07 10:46:57 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2015-02-07 10:46:57 -0500 |
commit | 2a2596fe615e4f18e0aff02cc8a016fea0463849 (patch) | |
tree | c4a22ca4a195fa4ccdbfee80bae83a1a309548e5 /cmd | |
parent | 3f2e99962cd466da2eb09fe4719f258e6f7a39e4 (diff) | |
download | gitea-2a2596fe615e4f18e0aff02cc8a016fea0463849.tar.gz gitea-2a2596fe615e4f18e0aff02cc8a016fea0463849.zip |
able to disable SSH for #883
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/serve.go | 6 |
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 { |