-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Conflict between Windows 1803 OpenSSH tooling and tooling bundled with Git for Windows. #1683
Comments
I do have Now for the fun part: this would make for an excellent first contribution! How, you ask? I am glad you asked, here is what I would suggest: Install Git for Windows' SDKThe easiest way is to download and run the installer from https://gitforwindows.org/#download-sdk. Alternatively, you could clone it yourself with your current Git for Windows: git clone --depth 1 https://github.com/git-for-windows/git-sdk-64 C:\git-sdk-64
C:\git-sdk-64\git-bash.exe Build your first installerJust to make sure that everything works as expected, call
Add the optionThe options are defined in the sdk cd build-extra
git config -e -f installer/install.iss (this "abuses" Where?Look for ./installer/release.sh -d ExtraOptions This looks like it runs the installer, but it really only shows one page. If you hit the Next button, it simply quits. This is great for debugging ;-) How?The new option could be modeled after the one enabling symbolic links: https://github.com/git-for-windows/build-extra/blob/cc9e7490b13f51a3491f6744b1c42b90b20e11f0/installer/install.iss#L1370-L1381 You probably need to use the Just like Finally, just like with the symbolic link option, you would configure |
I came across this while attempting to work on the SSH_ASKPASS for It is related enough I thought I could also work on this as a learning process. While also attempting to compile the openSSH package I get errors also. I did search for related issues without finding anything. I'm hoping to contribute on this and get my integration with VS Code Platform is Windows 7 professional. Installer build errors: openSSH package errors: Thanks in advance |
There was a recent Twitter discussion about this (https://twitter.com/nocentino/status/996895686166794240) and it seems like it should be on path by default but there are bugs preventing that for some users. |
@cleidigh that's strange. Hmm. I also have an untracked Can you simply delete that file (after verifying that you have no other Git SDK Bash windows open) and re-run?
OpenSSH is maintained as an MSYS2 package. These have to be built in a special Bash that you start via c:\git-sdk-64\msys2_shell.cmd -msys For details why this is needed, please see https://github.com/git-for-windows/git/wiki/Package-management#rebuild-packages (I know, it is hard to miss, but there are crucial differences between MSYS2 and MINGW). @cleidigh I must ask, though, why you want to rebuild OpenSSH? Don't you rather want to work on the installer side, which is what this here ticket is all about? Not that I think @pingzing should be proud of herself to sit by idly on the sidelines...
@Stanzilla for the record: I have a client version, and it is not installed by default. Maybe I have some company-wide settings preventing it? No idea. In any case, the reality is that we cannot rely on it to be installed by default, and that's that. |
@dscho After a series of install/build rounds, I think I have the main built environment working. On my main machine I'm completely running out of disk space and ended up with build errors because of not enough room. I installed on a different drive not realizing it was an HGFS partition. I have many inadvertently read on the MSYS requirement for NTFS. I believe this was the cause for some of the errors. Multiple installs perhaps caused the lock issues, that's less clear. Deleting the lock file did nothing. A fresh install on an older system that had no git Bash or SDK installs now builds GIT and the installer. If I start the MSYS shell I still have issues building openssh. I could not get it to build as it always Just an FYI, I have to do all computer work and programming with voice as I am disabled so my output |
Wow. I am impressed! I am currently busy with day-job stuff, so I probably won't have time this week to look and see whether I can help with the other ticket. Hopefully somebody else is able to help, so that you do not have to wait for such a long time... |
@dscho Hopefully I can finally get open SS each to compile, I think that's the only way to understand why |
@dscho I will use your suggestion to check the processes for an agent in addition to scanning the path |
That's a good idea! |
BTW I was made aware that 32-bit processes (such as the InnoSetup installer) do not see any |
I am not sure how to progress from here. After all, there have been worrisome reports about the native OpenSSH not working as intended. Maybe we should just leave this ticket alone, or even close it, for the time being? |
To be precise, I mean this report: PowerShell/Win32-OpenSSH#1322 |
Git for Windows does not use Cygwin. We use MSYS2, and we build our own version of the OpenSSH package. If you are thinking about the MSYS2 runtime, which is based on the Cygwin runtime, then I fear you'll just have to wait it out. The MSYS2 and Git for Windows projects are waiting for the v3.1.x series of the Cygwin runtime to stabilize before porting the MSYS2 runtime on top of it.
You can easily do that.
The easiest would be to avoid meddling with |
That would only affect Git though? Using the GFW SSH binary is causing issues with tools like fzf once connected via SSH, so I think that I need to adjust the PATH to put Windows SSH first – how do I do that? |
I have no idea what |
I wasn't asking for support for a specific tool. Other tools are affected as well. For now I've just added this alias to my alias ssh='winpty "C:\Windows\System32\OpenSSH\ssh.exe"' |
I am wondering, now that Windows ships with a newer version ( Personally, I am looking at two-ish different aspects of this:
My reasoning for the former is that this would prevent The latter should be more obvious – it should enable support for more tools to take advantage of ssh key management and allow for easier (more diverse) key management solution. For instance the KeePassXC OpenSSH implementation can already talk to the Windows agent service and be used for key management. No need to fiddle with the Does the following suggestion still apply?
|
@dscho based on this issue (and my comment above) as well as #2944 I was poking around the Now integrating the option on the page and maybe even detecting whether |
They are copied as part of the installation, via the If you want to delete stuff in the |
Addressed via git-for-windows/build-extra#367 |
Setup
defaults?
to the issue you're seeing?
I recently updated to the 1803 Spring Creator's update (version 10.0.17134) version of Windows, which now ships native versions of the OpenSSH tools (see OpenSSH-based client and server near the bottom).
Those automatically placed themselves in my $PATH, and I decided to start using them, instead of those bundled with Git for Windows.
Details
PowerShell.
Minimal, Complete, and Verifiable example
this will help us understand the issue.
...for example, would request my ssh credentials even though the new native ssh-agent was running, and I had added my key to it.
Git for Windows would use the new, native
ssh.exe
on my $PATH, as well as the runningssh-agent.exe
, and do things.I was prompted for my key credentials.
I was able to work around this by taking advantage of the
GIT_SSH
environment variable, which I pointed to the new OpenSSH tooling atC:\Windows\System32\OpenSSH\ssh.exe
.I might suggest that for future releases, the installer could test for the native versions of the tools, and if those exist, not install Git for Windows versions of them.
The text was updated successfully, but these errors were encountered: