-
Notifications
You must be signed in to change notification settings - Fork 768
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
Private key with Windows line endings produce invalid format error #1315
Comments
This is fixed in 7.7.*. Please try the latest version. Reopen if you still see any issues. |
@manojampalam Thanks for the feedback. I installed all the updates on my Windows 10 setup but still have the older version of OpenSSH. Is there any way to get the latest version installed, or do I need to wait for future updates to be pushed to my device? |
hmm. you should see 7.7 in the latest update (1809)
|
@manojampalam After applying all updates and rebooting I currently have this environment:
Do I need to enable anything, like an insider preview or something similar? |
@manojampalam On Windows Server I am getting the new version:
It would appear that Windows 10 is running behind. |
@manojampalam I just got the October update this morning and am now running on the latest version:
|
After the update I am now running into a completely unrelated issue: https://github.com/MicrosoftDocs/windowsserverdocs/issues/2235 I am therefore unfortunately unable to test this. |
I've raised an issue to have the docs updated. |
@manojampalam Thanks, that fixed the problem for me and am now able to test this. I can confirm this is working fine now on my environment with Windows line endings. |
"OpenSSH for Windows" version
OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
Client OperatingSystem
Windows 10 Home
What is failing
ssh-add
Expected behavior
The key is added to the SSH agent.
Actual behavior
I get the following error message:
Error loading key "C:\Users\myusername/.ssh/id_rsa": invalid format
Workaround
Open the file containing the private key in for example Notepad++, select "Edit" -> "EOL Conversion" -> "Unix (LF)" and save.
Notes
This situation is likely to happen when you have your key checked into version control and your git client automatically converts line endings from Unix to Windows format. This happening to other files like your
~/.ssh/config
appear to not cause problems.The text was updated successfully, but these errors were encountered: