From 1e0a2ab5f733572fed9743127b23ac292751e3b8 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 22 Jul 2024 11:33:34 +0800 Subject: [PATCH] enhance: add `-o StrictHostKeyChecking=accept-new` option to ssh command --- src/Commands/Command.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/Command.cs b/src/Commands/Command.cs index 48ef1825..26083ef9 100644 --- a/src/Commands/Command.cs +++ b/src/Commands/Command.cs @@ -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 ";