-
-
Notifications
You must be signed in to change notification settings - Fork 809
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
Windows 10 version 1803 broke my ssh-agent #583
Comments
Yup, see the latest on #575 Actually, I prefer the new ssh support as I can use VS now without having to start it from PowerShell. We're also considering removing the ssh support in posh-git to another module. |
This is going to keep coming up now that it's shipping with Windows, so we need to teach
With Windows moving toward OpenSSH being in the box, and Git for Windows likely to handle this better in the future (git-for-windows/git#1683, git-for-windows/git#1556), we may be able to just punt altogether on spinning out another module. Just drop the helpers from 1.0 and assume folks can figure it out? |
On a system like Windows 10 1803, with OpenSSH installed or earlier version of Windows where you can install OpenSSH from here - I'm thinking maybe we just remove the helpers. The helpers are pretty simply replaced on such systems:
|
I was getting this message and I went into look at the local services and the actual "OpenSSH Authentication Agent" service was disabled. Maybe the 1803 update disabled it, but I'm not sure. I set the service to automatic and now all is fine. |
On my one test PC, every single, new Windows 10 Insiders build, disables the service so I have to configure/start it after each install. :-( |
Opened #586 to address this. |
@dahlbyk should this now be under the 0.8 milestone? |
I have the same problem on a Windows 10 Pro, v.1803 and Open SSH Service set to Automatic. |
@sebid Yes, the workaround for now is to explicitly unset the ssh variables. Edit your profile and add the following after you import posh-git:
(Makes sure you're not also calling You'll also need to make sure that you configure git to use use the new openssh if you haven't already:
This is already fixed in the repo ready for the 0.8 release. |
Thank you. if 0.8 is in the pipeline I can wait for a release :) |
@JeremySkinner I had a new dev try this yesterday and we couldn't get it to work with OpenSSH:
We reverted back to using the env var and that worked. Any idea what we might have been doing wrong? We verified the path was correct. We try both forward and backward slashes. |
@rkeithhill hm strange, this is what I have in my .gitconfig which is working:
Could it be that it needs the quotes? |
Oh and I assume that the service was started? :D |
It had quotes because the path is under |
OK, this works when your path has spaces in it:
From https://help.github.com/articles/associating-text-editors-with-git/ This also works when you need to specify parameters to ssh like we do:
|
My recommendation: Remove the buggy windows component (which since Windows 10 1803 is installed by default), using PS as admin This will remove the need to specify paths. |
Well that will only remove it if you enabled the optional component. Most folks really should be installing the latest OpenSSH bits using Chocolatey. The Chocolatey pkg has been keeping up with bug fixes and is several revs ahead of what you get with the optional component. FWIW I've been using this with Git for the past ~8 months and it's been working fine. |
@rkeithhill Installing latest version of poshgit on windows 10 1803 or later will give you this bug since the "optional component" is installed by default and overrides any other openssh client in path, so uninstalling it is required unless you want to keep forcing alternative paths to OpenSSH, I'm sure that is fine. But I rather not have Microsofts version of OpenSSH on my system at all. |
Hmm, I'm not seeing that on the systems on our dev team. The nature of being "optional" is that you have to go out of your way to install/enable it. That said, if you don't want the Microsoft version of OpenSSH that's fine too. :-) |
Again, it is installed by default on 1803 (or at least when upgrading from 1709 to 1803), and optional means "not required" and has nothing to do with if it is installed on a standard installation or not ;) |
Thank you for a great module. PS: I apologize if this has already been answered! |
Just importing |
Hi @rkeithhill, I'm not using any of the SSH commands. Just importing the I was able to resolve this by upgrading to |
No problem. Glad 2.20.1 resolved it but after looking at the 2.20.1 release notes, I'm not sure why it fixed it. |
@rkeithhill yeah me neither as it was a minor update with new version of |
Pretty sure this issue is the same problem I'm having... Git Bash is remembering my key passphrase correctly, but I tend to use Powershell for most tasks which refuses to remember anything. In Powershell, if I run
If I run
It's like git on my computer is using the wrong ssh agent? Looking at the start ssh agent commands I have available: If I run If I run So posh-git is using System32/OpenSSH... I have run: Still no luck, git is using Edit: Solved I updated my "Git for Windows" to the latest version and it's now working correctly with the inbuilt ssh-agent. Hooray! I guess when I installed Git originally none of this was a problem... Before: git version 2.9.x Also, you can just run the new installer over the top, which is nice! |
I will point out though that if you can use the built-in SSH and ssh-agent, it will A) remember your SSH key passwords across reboots and B) the ssh-agent Windows service will be available to all process - not just processes launched from the same PowerShell process that started the ssh agent that comes with Git for Windows. This is handy for GUI applications like Visual Studio which are typically launched from the Start menu or taskbar and not from a PowerShell console. |
This is the important bit that I needed after a fresh install using a |
Edit: I found out this was already answered above: #583 (comment), with a better approach. An alternative approach to those who installed OpenSSH in your Program Files or any other folder with spaces in them: use the old Windows names:
|
Also, this comment #583 (comment) is actually very important - using the |
Given that we have split out SSH support into a separate module |
Nuke environment variables as set by posh-git see: dahlbyk/posh-git#583 (comment)
System Details
Issue Description
When Windows 10 updates to 1803, SSH is now native on windows and SSH-AGENT is now a windows service.
Posh-Git only currently works with SSH installed as part of the Git tools.
The effect is Start-SshAgent -Quiet will ask you to enter a password every time you start a console session and git will ask you to enter your password as the ssh-agent's are conflicting.
If you need to get git working with the new SSH
http://adamralph.com/2018/05/15/windows-10-version-1803-broke-my-git-ssh/
Fun times :)
The text was updated successfully, but these errors were encountered: