-
Notifications
You must be signed in to change notification settings - Fork 894
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
Question: SSH Support #1422
Comments
@ethomson SSH support is really important to my, and a lot of others' use cases, so it would be really good if there was a straightforward way to add SSH support even if it is not directly supported in the core libgit2sharp. There are really 2 parts to this:
@ethomson You mentioned in the other thread the idea of using a managed SSH library - can you expand on how this might work? I can't see a way of doing this without modifying libgit2 itself but I may be missing something |
Why is this happening when trying to connect to BitBucket server with LibGit2Sharp-SSH: "Failed to start SSH session: Unable to exchange encryption keys"? I have the latest version. I even had to hack the NuGet package, because it's locked into version 1.0.15 of the native binaries, even though 1.0.16 exist, which I only did in the off chance that there was something outdated about 1.0.15, but the same error persists even with the newest binaries (1.8.1.0). For some reason 1.0.15 was still using 1.7.0 binaries. Anyway, does anyone know why this error would occur? It's being returned from session.c's call to _libssh2_kex_exchange. |
@motowilliams @rotemwolfovich FYI since I needed an up to date build that supported SSH and worked on .NET Core on linux, I've got a build working in a fork here https://github.com/alex-weaver/libgit2sharp @ethomson might a solution to the issue of not wanting to distribute a crypto library be to merge the code/build scripts to support SSH into the main repo, but hide it behind a feature flag in the build? This way the official nuget packages don't get SSH support, but users can easily build a version with SSH if they require one. |
Yes, I'm certainly open to this. |
@alex-weaver |
While some may find it easy to build SSH support in a fork it is a big hurdle and not having it a showstopper for many use cases. It would be great to have something in this repo, even if it's a combination of loose code and docs on how to get it working, or maybe a separate NuGet package, or something that only works on .NET Core or whatever. Just anything approachable. |
I agree with @felixfbecker, we have to use a custom fork of LibGit2Sharp-SSH in our company and we don't have the time to properly maintain it and merge new features into our fork. It really is a pain for us and we'd find it much easier to have it supported by this project, even if it requires custom building steps. Please think about it :) |
quick question: did this ever get implemented? I've been struggling for the past few days with building a ssh-enabled version, but never got it to work on platforms other than windows. There are loads of different forks wich probably worked one day but are wildly out of date. Not a single one currently even compiles without modification. This would likely also help with #1727 since halve of the 3rd parties revolve around the ssh support. |
@ethomson Could you please provide an update on SSH implementation status? I see that this topic is largely ignored. Maybe there is another maintained C# wrapper for libgit2 around that you could recommend instead? Thanks! |
I would also need SSH support very much to be able to connet to AzureDevops, which doesn't support alternate credentials anymore. Is there any alternative lib? Or are there any plans to support this? |
I can't really get why there's still no SSH support... The whole library is kinda meaningless when we still need horrible constructions like this: Process.Start(new ProcessStartInfo
{
WorkingDirectory = repository.Info.WorkingDirectory,
FileName = "git",
Arguments = "pull" // or "push"
}).WaitForExitAsync(); to invoke push or pull without worrying about
I don't think anyone here gives a single heck about one-two-ten third-party library(-ies) to make this work out-of-box ¯\(ツ)/¯ |
While I understand your concern (and we're also struggling without SSH support), I think it has to do with the Export Control. @ethomson Maybe the library authors could still introduce SSH support but disable it by default, letting people who are willing to fork the library to enable it and deal with the Export Control within their organisations? |
It's not related to export control, it's about who deals with the security releases. If there's a major security vulnerability in libssh2, who's doing the work to get a new version of LibGit2Sharp updated with that new libssh2, notifying users, etc? There's nobody to do that work. In fact, there's already not enough people pushing LibGit2Sharp forward. But without a commitment to security, introducing SSH support means that libssh2's patched CVEs become our unpatched, exploitable CVEs. |
Makes sense, especially since there's still no update to libgit2 v1.0 and the project is kinda abandoned in general 😞 |
There are a some issues and PRs that are closed merged but from the docs and SO questions there seems to be some confusion if this is actually a supported features or not. Would it be possible to have the docs updated to indicate as such?
The text was updated successfully, but these errors were encountered: