summaryrefslogtreecommitdiffstats
path: root/modules/setting/setting.go
diff options
context:
space:
mode:
authorClar Fon <usr@ltdk.xyz>2022-02-07 16:56:45 -0500
committerGitHub <noreply@github.com>2022-02-07 16:56:45 -0500
commit99d14f6051854fe0e6dfc7fb6f4eb0a839179977 (patch)
tree746cd4e72854e696c87f017c9238f510f826879b /modules/setting/setting.go
parent9911b66aea076347cfb271b12c90bc31e4e5b5f8 (diff)
downloadgitea-99d14f6051854fe0e6dfc7fb6f4eb0a839179977.tar.gz
gitea-99d14f6051854fe0e6dfc7fb6f4eb0a839179977.zip
Add separate SSH_USER config option (#17584)
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r--modules/setting/setting.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 5b8683f578..7841fbcdc3 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -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()