1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Add separate SSH_USER config option (#17584)

Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
Clar Fon
2022-02-07 16:56:45 -05:00
committed by GitHub
parent 9911b66aea
commit 99d14f6051
7 changed files with 13 additions and 8 deletions

View File

@ -131,6 +131,7 @@ var (
BuiltinServerUser string `ini:"BUILTIN_SSH_SERVER_USER"`
Domain string `ini:"SSH_DOMAIN"`
Port int `ini:"SSH_PORT"`
User string `ini:"SSH_USER"`
ListenHost string `ini:"SSH_LISTEN_HOST"`
ListenPort int `ini:"SSH_LISTEN_PORT"`
RootPath string `ini:"SSH_ROOT_PATH"`
@ -970,6 +971,7 @@ func loadFromConf(allowEmpty bool, extraConfig string) {
}
SSH.BuiltinServerUser = Cfg.Section("server").Key("BUILTIN_SSH_SERVER_USER").MustString(RunUser)
SSH.User = Cfg.Section("server").Key("SSH_USER").MustString(SSH.BuiltinServerUser)
newRepository()