-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Provide option to embed libssh2 #2428
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
Conversation
/cc @nulltoken @Therzok |
BTW, what you do in its current state is clone libssh2 and put it somewhere, and call CMake with |
That means we could submodule libssh2 in libgit2sharp. That's a win-win. |
Yeah, I wouldn't like to submodule it in libgit2 directly, as it's not integral to libgit2 working and it's only needed on this one OS. Putting it into libgit2sharp would probably cover 80% of the uses. |
I ❤️ this! How about you @ethomson @martinwoodward? |
Since you mention Martin (sorry Martin, I associate you with lawyers), we (libgit2) don't really need to do anything, but if you redistribute the compiled version (which libgit2sharp would), you need to include a bit of text with the license and copyright statement. |
Any movement on this? |
This was partly a PoC, since I don't use Windows and MS are going to take a long time to review this, so I need feedback from someone actually using it and finding it useful. |
@carlosmn The binaries at [1] use this option, and I have mild support for SSH written in libgit2sharp which proves it just works™. One way to test this actually works is checkout this branch, build libgit2sharp and modify it to work with this change make the Unit Tests check if SSH is enabled. [1] - https://github.com/mono/libgit-binary/tree/master/windows |
Checking for enabled alone isn't necessarily enough; we'd have to test that fetching and pushing works, but if you've managed to get it to work, then I don't see any reason to delay merging this. |
I can also vouch that libssh2 works as expected on Windows (together with OpenSSL, haven't tested it against Microsoft's Crypto API). |
If you build everything with |
this one uses crypto API. I used libssh2 master at the time. |
Closing in favour of #2600 |
For those who need to build on Windows, provide a way to embed the libssh2 code into our own so we can have it without worrying about calling convention or building the external library with a name that doesn't conflict with some random dll someone built with a different convention.
This gives us a ton of warnings, but we should be able to add a bunch of
#pragma
s. I haven't tested it that much, but it does successfully fail to log into GitHub with a nonsensical auth combination.This needs libssh2 from its master branch.