Skip to content

Commit 55ca37e

Browse files
committed
Tweak for better behavior on first connection
1 parent d807278 commit 55ca37e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cls/SourceControl/Git/Utils.cls

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,8 +1106,13 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
11061106

11071107
set privateKeyFile = ..PrivateKeyFile()
11081108
if (privateKeyFile '= "") {
1109+
if $$$isWINDOWS {
1110+
// Escape slashes
1111+
set privateKeyFile = $Replace(privateKeyFile,"\","\\")
1112+
}
11091113
set newArgs($i(newArgs)) = "-c"
1110-
set newArgs($i(newArgs)) = "core.sshCommand=ssh -F /dev/null -i "_privateKeyFile
1114+
// StrictHostKeyChecking=accept-new for good behavior on first connection
1115+
set newArgs($i(newArgs)) = "core.sshCommand=ssh -F /dev/null -o StrictHostKeyChecking=accept-new -i "_privateKeyFile
11111116
}
11121117

11131118
set username = ..GitUserName()

0 commit comments

Comments
 (0)