From 34bd04f92580690af019dcc4349fe6f3c8dba006 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 30 Mar 2018 04:40:13 -0400 Subject: [PATCH] MISC: fix typo and grammar Reference: https://github.com/gogits/gogs/commit/932490d7f137a2adf896e4e9326f4e8f2b9a2b54#commitcomment-28344918 --- cmd/web.go | 2 +- pkg/setting/setting.go | 6 +++--- routes/install.go | 4 ++-- templates/admin/config.tmpl | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/web.go b/cmd/web.go index efaeb6c93..9a709e1cd 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -727,7 +727,7 @@ func runWeb(c *cli.Context) error { } if err != nil { - log.Fatal(4, "Fail to start server: %v", err) + log.Fatal(4, "Failed to start server: %v", err) } return nil diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go index ef7d0b864..ab6c74693 100644 --- a/pkg/setting/setting.go +++ b/pkg/setting/setting.go @@ -89,7 +89,7 @@ var ( ListenHost string `ini:"SSH_LISTEN_HOST"` ListenPort int `ini:"SSH_LISTEN_PORT"` RootPath string `ini:"SSH_ROOT_PATH"` - RewriteAuthorizedKeysAtStrat bool `ini:"REWRITE_AUTHORIZED_KEYS_AT_START"` + RewriteAuthorizedKeysAtStart bool `ini:"REWRITE_AUTHORIZED_KEYS_AT_START"` ServerCiphers []string `ini:"SSH_SERVER_CIPHERS"` KeyTestPath string `ini:"SSH_KEY_TEST_PATH"` KeygenPath string `ini:"SSH_KEYGEN_PATH"` @@ -487,7 +487,7 @@ func NewContext() { } SSH.RootPath = path.Join(homeDir, ".ssh") - SSH.RewriteAuthorizedKeysAtStrat = sec.Key("REWRITE_AUTHORIZED_KEYS_AT_START").MustBool() + SSH.RewriteAuthorizedKeysAtStart = sec.Key("REWRITE_AUTHORIZED_KEYS_AT_START").MustBool() SSH.ServerCiphers = sec.Key("SSH_SERVER_CIPHERS").Strings(",") SSH.KeyTestPath = os.TempDir() if err = Cfg.Section("server").MapTo(&SSH); err != nil { @@ -507,7 +507,7 @@ func NewContext() { } if SSH.StartBuiltinServer { - SSH.RewriteAuthorizedKeysAtStrat = false + SSH.RewriteAuthorizedKeysAtStart = false } // Check if server is eligible for minimum key size check when user choose to enable. diff --git a/routes/install.go b/routes/install.go index 2c50f1b3e..29177936d 100644 --- a/routes/install.go +++ b/routes/install.go @@ -94,9 +94,9 @@ func GlobalInit() { log.Trace("SSH server cipher list: %v", setting.SSH.ServerCiphers) } - if setting.SSH.RewriteAuthorizedKeysAtStrat { + if setting.SSH.RewriteAuthorizedKeysAtStart { if err := models.RewriteAuthorizedKeys(); err != nil { - log.Warn("Fail to rewrite authorized_keys file: %v", err) + log.Warn("Failed to rewrite authorized_keys file: %v", err) } } } diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 38d5e5504..e7f7c3a08 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -62,7 +62,7 @@
{{.i18n.Tr "admin.config.ssh_root_path"}}
{{.SSH.RootPath}}
{{.i18n.Tr "admin.config.ssh_rewrite_authorized_keys_at_start"}}
-
+
{{.i18n.Tr "admin.config.ssh_key_test_path"}}
{{.SSH.KeyTestPath}}
{{.i18n.Tr "admin.config.ssh_keygen_path"}}