fix ssh domain default value to domain (#930)

This commit is contained in:
Lunny Xiao 2017-02-15 00:07:37 +08:00 committed by GitHub
parent 4cfde304df
commit cf47532ebc
1 changed files with 4 additions and 1 deletions

View File

@ -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 {