-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
Add SSH support on Windows platforms #994
Comments
So after some digging it should be able to build libssh for windows on the current appveyor plattform with something like:
and then integrate it into libssh2 with the
Currently this fails in my local build environment due to unresolved linking issues but I was only able to test this with VS 2019, so it might have to do with my build env beeing too new. |
This would be very nice. Maybe you can make a branch and let AppVeyor build, see whether it works with VS 2015? I know very little about Windows, maybe @fourplusone can help? |
External build already works even if I only fork. But the need to push and wait (re-building libgit2 every time) while debugging isn't an optimal workflow as you can imagine 😅 |
Okay, the initial approachusing Docker for Windows failed. At least for me the current Windows Containers implementation, even on Server 2019, seems to unstable to use. So the main issue here seems to be that altought provided the I then noticed that
into the |
So I got this compiling finally. ssh support is available on Windows. But libgit2 seems to be failing to actually make any ssh connection.
Works on Linux, but when I run it on Windows with the embedded Just not sure why the socket is beeing disconnected yet. |
Cool, I think it's still worth building with libssh2. Ideally I think libgit2 should provide binaries for Windows, so bindings don't have to. This would avoid duplicating the work in every binding, and also would speed up CI. Maybe it's worth checking what other bindings do, such as the one for Ruby. ping @ethomson |
To be clear up front: this is ultimately Your Decision, not mine. 😁 But I do want to give some background: The LibGit2Sharp project has decided not to ship libssh2. The rationale is that the team decided that if they were to distribute the binaries of libssh2 then they would also has to do the work of responding to critical security releases. If there's a security vulnerability in libssh2 that they were shipping then that would become a security vulnerability in LibGit2Sharp that needed to be addressed. The team, at the time, was not eager to "own" that process. Although that means - much like the status quo of pygit2 - that users will not get SSH support by default and would need to build their own binaries. In practice, nobody does this. I don't have in-depth knowledge about any other bindings, I'm afraid. I don't think that any of them ship libssh2, but I could be mistaken.
It does not support dynamic loading during runtime. The PR you're linking to was not merged for a plurality of reasons.
Nor am I, sorry. I know very little about libssh2. |
Hm, but couldn't that process be much simplified and automated? |
@jdavid I think it's important to have libssh2 shipped in manylinux1 wheels. Users who want pygit2 linked against their system libssh2 would probably use the dists that are coming from OS package managers packaged by their respective maintainers (talking about homebrew, deb, rpm, ebuild etc). The main reason I contributed manylinux wheels was that I won't have to set up the env with a build toolchain for installing from sdist (nobody wants this usually). Also, I agree with @M451 — if building and publishing new wheels is well-automated, it's pretty easy to release often, mostly targeting the latest version of Another option would probably be to depend on something external like https://pypi.org/project/ssh2-python/#history but it looks poorly maintained. |
Ok, let's keep the current status quo then. Just have to add libssh2 to the Windows wheels. No idea about the |
Okay. I'll test and provide a working PR based on appveyor. |
When I was looking at macOS wheels I found this, which basically implied libssh2 isn't recommended, and doesn't do what people need (modern EC crypto, handling openssh config files, etc). I was planning to revisit once libgit2 switches to libssh. |
Has there been any movement on this? having SSH support in windows would be a huge help for me. |
I didn't find the time to add the wheel to the windows lib yet but even with it, it would not be working on Windows (yet), see |
What is the current status on this? Has any work been done? |
So pygit2 now comes with a pre-compiled libgit2. That's nice.
But on Windows platforms it seems that SSH support is not enabled in that pre-compiled libgit2 version. Even if one installs libssh2, the included libgit2 will not work with SSH.
E.g.:
Will still report false. Not sure if I'm missing something here but if I understand this correctly then it would be nice if the included libgit2 would enable SSH support and eventually even come with a pre-compiled libssh2 for Windows platforms.
I saw that this was on the todo list here: #902
But it's not ticked and I'm not sure it was ever done.
The text was updated successfully, but these errors were encountered: