mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	don't append key file if asked not to (#13368)
This commit is contained in:
		@@ -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
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user