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 f67b7d0 commit 049d0bbCopy full SHA for 049d0bb
agent/agent.go
@@ -12,6 +12,7 @@ import (
12
"os/exec"
13
"os/user"
14
"runtime"
15
+ "strings"
16
"sync"
17
"time"
18
@@ -318,6 +319,9 @@ func (a *agent) handleSSHSession(session ssh.Session) error {
318
319
if err != nil {
320
return xerrors.Errorf("getting os executable: %w", err)
321
}
322
+ // Git on Windows resolves with UNIX-style paths.
323
+ // If using backslashes, it's unable to find the executable.
324
+ executablePath = strings.ReplaceAll(executablePath, "\\", "/")
325
cmd.Env = append(cmd.Env, fmt.Sprintf(`GIT_SSH_COMMAND=%s gitssh --`, executablePath))
326
327
sshPty, windowSize, isPty := session.Pty()
0 commit comments