You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Git for Windows installer has an option to use OpenSSH. This sets GIT_SSH to C:/Windows/System32/OpenSSH/ssh.exe.
In git-lfs' custom subprocess logic, / is not recognized as a path separator, and thus it tries to find an exe with that name in PATH.
(Arguably it's a bug in Go oversimplifying things: os.PathSeparator is misleading as there's more than one separator on Windows, but that ship has sailed... See I want off Mr. Golang's Wild Ride for more fun gotchas.)
To Reproduce
set GIT_SSH=C:/Windows/System32/OpenSSH/ssh.exe
Try to use LFS
Error snippet:
batch request: executable file not found in %PATH%
error: failed to fetch some objects from '[...].git/info/lfs'
Workaround: set GIT_SSH=C:\Windows\System32\OpenSSH\ssh.exe
(or in the Windows environment variable settings for system wide fix)
Expected behavior
No error.
System environment
Git for Windows
Output of git lfs env
git-lfs/3.5.1 (GitHub; windows amd64; go 1.21.7; git e237bb3a)
git version 2.45.0.windows.1
[...]
GIT_SSH=C:/Windows/System32/OpenSSH/ssh.exe
[...]
The text was updated successfully, but these errors were encountered:
Hey, thanks for the report! I've marked this as a Windows bug and put it into our backlog.
One thing for us to keep in mind is that we might remove our custom executable-lookup logic, now that it's no longer needed (see #5612), and so anything we do to try to resolve this problem should, ideally, avoid introducing more custom logic into that code.
Describe the bug
The Git for Windows installer has an option to use OpenSSH. This sets
GIT_SSH
toC:/Windows/System32/OpenSSH/ssh.exe
.In git-lfs' custom subprocess logic,
/
is not recognized as a path separator, and thus it tries to find an exe with that name inPATH
.(Arguably it's a bug in Go oversimplifying things:
os.PathSeparator
is misleading as there's more than one separator on Windows, but that ship has sailed... See I want off Mr. Golang's Wild Ride for more fun gotchas.)To Reproduce
set GIT_SSH=C:/Windows/System32/OpenSSH/ssh.exe
Error snippet:
Workaround:
set GIT_SSH=C:\Windows\System32\OpenSSH\ssh.exe
(or in the Windows environment variable settings for system wide fix)
Expected behavior
No error.
System environment
Git for Windows
Output of
git lfs env
The text was updated successfully, but these errors were encountered: