Skip to content

Commit 2e20b0e

Browse files
committed
enhance: when a private key is given, do not read default ssh configuration
Signed-off-by: leo <longshuang@msn.cn>
1 parent 99c7e38 commit 2e20b0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Commands/Command.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ protected ProcessStartInfo CreateGitStartInfo(bool redirect)
181181

182182
// If an SSH private key was provided, sets the environment.
183183
if (!start.Environment.ContainsKey("GIT_SSH_COMMAND") && !string.IsNullOrEmpty(SSHKey))
184-
start.Environment.Add("GIT_SSH_COMMAND", $"ssh -i '{SSHKey}'");
184+
start.Environment.Add("GIT_SSH_COMMAND", $"ssh -i '{SSHKey}' -F '/dev/null'");
185185

186186
// Force using en_US.UTF-8 locale
187187
if (OperatingSystem.IsLinux())

0 commit comments

Comments
 (0)