We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5575e3c commit 6fc556fCopy full SHA for 6fc556f
agent/agent.go
@@ -11,6 +11,7 @@ import (
11
"os"
12
"os/exec"
13
"os/user"
14
+ "strings"
15
"sync"
16
"time"
17
@@ -236,6 +237,9 @@ func (a *agent) handleSSHSession(session ssh.Session) error {
236
237
if err != nil {
238
return xerrors.Errorf("getting os executable: %w", err)
239
}
240
+ // Git on Windows resolves with UNIX-style paths.
241
+ // If using backslashes, it's unable to find the executable.
242
+ executablePath = strings.ReplaceAll(executablePath, "\\", "/")
243
cmd.Env = append(cmd.Env, fmt.Sprintf(`GIT_SSH_COMMAND=%s gitssh --`, executablePath))
244
245
sshPty, windowSize, isPty := session.Pty()
0 commit comments