enhance: add -o StrictHostKeyChecking=accept-new option to ssh command

This commit is contained in:
leo 2024-07-22 11:33:34 +08:00
parent 5fed050400
commit 1e0a2ab5f7
No known key found for this signature in database

View file

@ -58,7 +58,7 @@ namespace SourceGit.Commands
// If an SSH private key was provided, sets the environment.
if (!string.IsNullOrEmpty(SSHKey))
start.Environment.Add("GIT_SSH_COMMAND", $"ssh -i '{SSHKey}'");
start.Environment.Add("GIT_SSH_COMMAND", $"ssh -o StrictHostKeyChecking=accept-new -i '{SSHKey}'");
else
start.Arguments += "-c credential.helper=manager ";