diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-07-10 14:50:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-10 14:50:26 +0800 |
commit | 27e2def5f0390a9f8d1e059c83783f7d2abd0019 (patch) | |
tree | 37b7acf2e2df4d13cd3117728a5de3db9488007a /routers | |
parent | a9e66cfdad6ec67194a2257a3ccdfc26b7c2054d (diff) | |
download | gitea-27e2def5f0390a9f8d1e059c83783f7d2abd0019.tar.gz gitea-27e2def5f0390a9f8d1e059c83783f7d2abd0019.zip |
Refactor SSH init code, fix directory creation for TrustedUserCAKeys file (#20299)
* Refactor SSH init code, fix directory creation for TrustedUserCAKeys file
* Update modules/ssh/init.go
Co-authored-by: zeripath <art27@cantab.net>
* fix lint copyright
* Update modules/ssh/init.go
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/init.go | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/routers/init.go b/routers/init.go index 2898c44607..72ccf3526c 100644 --- a/routers/init.go +++ b/routers/init.go @@ -6,10 +6,8 @@ package routers import ( "context" - "net" "reflect" "runtime" - "strconv" "code.gitea.io/gitea/models" asymkey_model "code.gitea.io/gitea/models/asymkey" @@ -158,14 +156,8 @@ func GlobalInitInstalled(ctx context.Context) { mustInitCtx(ctx, syncAppPathForGit) - if setting.SSH.StartBuiltinServer { - ssh.Listen(setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs) - log.Info("SSH server started on %s. Cipher list (%v), key exchange algorithms (%v), MACs (%v)", - net.JoinHostPort(setting.SSH.ListenHost, strconv.Itoa(setting.SSH.ListenPort)), - setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs) - } else { - ssh.Unused() - } + mustInit(ssh.Init) + auth.Init() svg.Init() } |