Improve handling of SSH host keys
1. Use StrictHostKeyChecking=accept-new to implicitly accept new SSH host keys, preventing us from having to do this manually. 2. Use VerifyHostKeyDNS=yes to allow verification of DNSSEC-signed SSHFP records, if available.
This commit is contained in:
		@@ -99,7 +99,7 @@ def clone_repository(clone_url, config):
 | 
				
			|||||||
    print(f"Cloning repository...")
 | 
					    print(f"Cloning repository...")
 | 
				
			||||||
    if config['ssh_key'] is not None:
 | 
					    if config['ssh_key'] is not None:
 | 
				
			||||||
        ssh_key_file = config['ssh_key']
 | 
					        ssh_key_file = config['ssh_key']
 | 
				
			||||||
        os.environ['GIT_SSH_COMMAND'] = f'ssh -i {ssh_key_file} -o IdentitiesOnly=yes'
 | 
					        os.environ['GIT_SSH_COMMAND'] = f'ssh -i {ssh_key_file} -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new -o VerifyHostKeyDNS=yes'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    os.system(f'git clone {clone_url} repo')
 | 
					    os.system(f'git clone {clone_url} repo')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user