From cf47532ebc57d31d854c2ba5b7d920c3f492913f Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 15 Feb 2017 00:07:37 +0800 Subject: [PATCH] fix ssh domain default value to domain (#930) --- modules/setting/setting.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 583dab40fa..bbccb44eab 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -96,7 +96,7 @@ var ( }{ Disabled: false, StartBuiltinServer: false, - Domain: "localhost", + Domain: "", Port: 22, KeygenPath: "ssh-keygen", } @@ -623,6 +623,9 @@ please consider changing to GITEA_CUSTOM`) LandingPageURL = LandingPageHome } + if len(SSH.Domain) == 0 { + SSH.Domain = Domain + } SSH.RootPath = path.Join(homeDir, ".ssh") SSH.KeyTestPath = os.TempDir() if err = Cfg.Section("server").MapTo(&SSH); err != nil {