summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2020-11-01 01:57:41 +0100
committerGitHub <noreply@github.com>2020-10-31 20:57:41 -0400
commitf3bbd46c49fb7a2e3407d4da0db511930c957e3c (patch)
tree50e34de55b7b6463f10e9aa7da83b1bf5c942617
parent2ac112d84e7318a294b1e8cea5adae2dd50c89df (diff)
downloadgitea-f3bbd46c49fb7a2e3407d4da0db511930c957e3c.tar.gz
gitea-f3bbd46c49fb7a2e3407d4da0db511930c957e3c.zip
don't append key file if asked not to (#13368)
-rw-r--r--models/ssh_key.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go
index d67981398b..29a4fd2932 100644
--- a/models/ssh_key.go
+++ b/models/ssh_key.go
@@ -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
}