]> source.dussan.org Git - gitea.git/commitdiff
don't append key file if asked not to (#13368)
authorAntoine GIRARD <sapk@users.noreply.github.com>
Sun, 1 Nov 2020 00:57:41 +0000 (01:57 +0100)
committerGitHub <noreply@github.com>
Sun, 1 Nov 2020 00:57:41 +0000 (20:57 -0400)
models/ssh_key.go

index d67981398bc00fcb40126cd0108c5e97c18180d3..29a4fd293283b230cef19145449f900fbd3db551 100644 (file)
@@ -362,7 +362,7 @@ func CheckPublicKeyString(content string) (_ string, err error) {
 // appendAuthorizedKeysToFile appends new SSH keys' content to authorized_keys file.
 func appendAuthorizedKeysToFile(keys ...*PublicKey) error {
        // Don't need to rewrite this file if builtin SSH server is enabled.
-       if setting.SSH.StartBuiltinServer {
+       if setting.SSH.StartBuiltinServer || !setting.SSH.CreateAuthorizedKeysFile {
                return nil
        }