mirror of
https://github.com/gogs/gogs.git
synced 2025-05-31 11:42:13 +00:00
MISC: fix typo and grammar
Reference: 932490d7f1 (commitcomment-28344918)
This commit is contained in:
parent
17d789a785
commit
34bd04f925
@ -727,7 +727,7 @@ func runWeb(c *cli.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(4, "Fail to start server: %v", err)
|
log.Fatal(4, "Failed to start server: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -89,7 +89,7 @@ var (
|
|||||||
ListenHost string `ini:"SSH_LISTEN_HOST"`
|
ListenHost string `ini:"SSH_LISTEN_HOST"`
|
||||||
ListenPort int `ini:"SSH_LISTEN_PORT"`
|
ListenPort int `ini:"SSH_LISTEN_PORT"`
|
||||||
RootPath string `ini:"SSH_ROOT_PATH"`
|
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"`
|
ServerCiphers []string `ini:"SSH_SERVER_CIPHERS"`
|
||||||
KeyTestPath string `ini:"SSH_KEY_TEST_PATH"`
|
KeyTestPath string `ini:"SSH_KEY_TEST_PATH"`
|
||||||
KeygenPath string `ini:"SSH_KEYGEN_PATH"`
|
KeygenPath string `ini:"SSH_KEYGEN_PATH"`
|
||||||
@ -487,7 +487,7 @@ func NewContext() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SSH.RootPath = path.Join(homeDir, ".ssh")
|
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.ServerCiphers = sec.Key("SSH_SERVER_CIPHERS").Strings(",")
|
||||||
SSH.KeyTestPath = os.TempDir()
|
SSH.KeyTestPath = os.TempDir()
|
||||||
if err = Cfg.Section("server").MapTo(&SSH); err != nil {
|
if err = Cfg.Section("server").MapTo(&SSH); err != nil {
|
||||||
@ -507,7 +507,7 @@ func NewContext() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if SSH.StartBuiltinServer {
|
if SSH.StartBuiltinServer {
|
||||||
SSH.RewriteAuthorizedKeysAtStrat = false
|
SSH.RewriteAuthorizedKeysAtStart = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if server is eligible for minimum key size check when user choose to enable.
|
// Check if server is eligible for minimum key size check when user choose to enable.
|
||||||
|
@ -94,9 +94,9 @@ func GlobalInit() {
|
|||||||
log.Trace("SSH server cipher list: %v", setting.SSH.ServerCiphers)
|
log.Trace("SSH server cipher list: %v", setting.SSH.ServerCiphers)
|
||||||
}
|
}
|
||||||
|
|
||||||
if setting.SSH.RewriteAuthorizedKeysAtStrat {
|
if setting.SSH.RewriteAuthorizedKeysAtStart {
|
||||||
if err := models.RewriteAuthorizedKeys(); err != nil {
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
<dt>{{.i18n.Tr "admin.config.ssh_root_path"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_root_path"}}</dt>
|
||||||
<dd>{{.SSH.RootPath}}</dd>
|
<dd>{{.SSH.RootPath}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_rewrite_authorized_keys_at_start"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_rewrite_authorized_keys_at_start"}}</dt>
|
||||||
<dd><i class="fa fa{{if .SSH.RewriteAuthorizedKeysAtStrat}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .SSH.RewriteAuthorizedKeysAtStart}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_key_test_path"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_key_test_path"}}</dt>
|
||||||
<dd>{{.SSH.KeyTestPath}}</dd>
|
<dd>{{.SSH.KeyTestPath}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.ssh_keygen_path"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.ssh_keygen_path"}}</dt>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user