admin管理员组

文章数量:1279124

How do I configure my git / git-lfs ssh command path correctly?

i configured my git ssh command like this:

git config core.sshCommand "C:\\Windows\\System32\\OpenSSH\\ssh.exe -i C:\\Users\\Admin\\.ssh\\id_rsa"

but when i try to perform a checkout the ssh path is lacking backslashes:

 batch request: sh: line 1: C:WindowsSystem32OpenSSHssh.exe: command not found: exit status 127

The interesting part is that it only fails for the smudge-filter, also the logs are from a jenkins-pipeline.

How do I configure my git / git-lfs ssh command path correctly?

i configured my git ssh command like this:

git config core.sshCommand "C:\\Windows\\System32\\OpenSSH\\ssh.exe -i C:\\Users\\Admin\\.ssh\\id_rsa"

but when i try to perform a checkout the ssh path is lacking backslashes:

 batch request: sh: line 1: C:WindowsSystem32OpenSSHssh.exe: command not found: exit status 127

The interesting part is that it only fails for the smudge-filter, also the logs are from a jenkins-pipeline.

Share Improve this question edited Feb 25 at 9:11 HelpNeeder asked Feb 25 at 9:11 HelpNeederHelpNeeder 12 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 0

Git for Windows provides a BASH emulation used to run Git from the command line. You need to use *nix shell style paths for the executable. However, I think the args passed to ssh.exe need to be windows paths. Try:

git config core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe -i C:\\Users\\Admin\\.ssh\\id_rsa"

本文标签: jenkinsGitLFS has wrong path for sshStack Overflow