-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 CRLF line endings causes "error in libcrypto" with bundled OpenSSH #4705
Comments
The reason is most likely PowerShell/openssh-portable@41e4e89#diff-911b87e474316fdc8c48074a84d40562d1b0e7f06fa587d9b8f13926c539d81c which has not made it into Git for Windows' bundled version of OpenSSH. |
@richardebeling how urgent do you need this? Urgently enough to backport the patch yourself and to open a PR? |
I can try to look into it. I haven't done any development for msys, cygwin or similar environments, so I'm not sure if I fully understand the impact of potential changes. From my understanding, git-for-windows maintains a fork of the msys2 packages, including the openssh package, which ends up in the installer. I don't think the upstreams (both msys2/MSYS2-packages and openssh/openssh-portable) would want to merge CRLF support since they focus on unix/posix environments. To locally fix this issue, it seems sane to me to add a new Where would a test for this go? git-for-windows/MSYS2-packages doesn't seem to run tests in CI, but it's not related to git, so the tests in this repo (./t/) also seem inappropriate to me. Could it, in the long run, make sense to use PowerShell/openssh-portable for the bundled SSH instead? I'd imagine that they improve other aspects of windows interoperability as well. This might have negative side effects in an msys environment that I'm currently unaware of, though. I'm a bit confused by the git-for-windows/MSYS2-packages fork diverging from its upstream (same for git-for-windows/MINGW-packages) -- is the workflow documented somewhere? |
That's pretty correct so far. Though we do pick up some packages directly from MSYS2.
MSYS2 might care about the increased interoperability with native Windows tools, but we can always upstream the patch later.
Yes, that's a good aproach.
Your patch could add a test to regress/. The corresponding
We do run
Probably not. Most of those changes don't make sense for an Msys2 executable.
There isn't much of a workflow. The histories diverge at some point and we update the package definitions for the packages we build ourselves when/if needed. |
I agree with all that @rimrul said.
Here is an interesting thought: we could establish The only downside that I can think of is that interactive SSH usage might change behavior because it no longer can use the pseudo terminal support provided by the MSYS2 runtime. However, interactive SSH support is not exactly included in Git for Windows' "contract". |
That could work. |
@richardebeling please note that I won't have time to get to this, so if you need this, please open a PR. |
Setup
I installed Git-2.43.0-64-bit.exe on Windows 10 Pro (64-bit) with the default "Use bundled OpenSSH" selection
Details
I want to connect to an SSH server using pubkey authentication. The private key file was created automatically by vagrant and can be read by Windows' bundled OpenSSH as well as PuttyGen. It uses CRLF as end-of-line markers.
The bundled SSH client doesn't load this private key, but instead prints
When changing the line endings to LF, loading it succeeds.
The text was updated successfully, but these errors were encountered: