0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-24 20:04:39 +01:00

don't append key file if asked not to (#13368)

This commit is contained in:
Antoine GIRARD 2020-11-01 01:57:41 +01:00 committed by GitHub
parent 2ac112d84e
commit f3bbd46c49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -362,7 +362,7 @@ func CheckPublicKeyString(content string) (_ string, err error) {
// appendAuthorizedKeysToFile appends new SSH keys' content to authorized_keys file. // appendAuthorizedKeysToFile appends new SSH keys' content to authorized_keys file.
func appendAuthorizedKeysToFile(keys ...*PublicKey) error { func appendAuthorizedKeysToFile(keys ...*PublicKey) error {
// Don't need to rewrite this file if builtin SSH server is enabled. // 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 return nil
} }