Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH in path takes priority over SSH in Git config #28

Open
chrisdjali-wrld3d opened this issue Nov 4, 2020 · 0 comments
Open

SSH in path takes priority over SSH in Git config #28

chrisdjali-wrld3d opened this issue Nov 4, 2020 · 0 comments

Comments

@chrisdjali-wrld3d
Copy link

System Details

  • posh-sshell version/path: 0.3.1, C:\Program Files\WindowsPowerShell\Modules\posh-sshell\0.3.1
  • PowerShell version: 5.1.18362.628
  • Operating system name and version: Windows 10 1909 build 18363.720
  • OpenSSH / Putty version: Windows built-in OpenSSH_for_Windows_7.7p1 plus OpenSSH_8.2p1 from Git for Windows

Issue Description

I have Git configured to use the Windows built-in OpenSSH that runs as a service, and in my OS path, that's the version that appears earliest. That works fine if I open PowerShell. However, in Git Bash, I need the non-windows versions of things earlier on the path, so that's set up to prepend the git/usr/bin directory to the path in the profile file. That also works fine. However, if I then run PowerShell from within Git Bash (as there are a few things that are easier that way), Posh-Sshell tries to work with the non-Windows OpenSSH and starts nagging for the key passphrase even though the Windows service is already running and will get used when I need it to be

I've monkey-patched this locally so it does roughly what I want (not nagging about the passphrase when the service is running) by adding -All to the Get-Command in Get-NativeSshAgent and suppressing the core.sshCommand warning when the version string from that SSH command suggests it's the Windows one, so if this is an unsupported workflow, I'm not doomed, but it might be worth considering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant