-
Notifications
You must be signed in to change notification settings - Fork 899
Introduce SSH functionality #1072
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
Taking some important bits into discussion:
|
cc @nulltoken |
I'll rebase this as soon as possible. And I would like to have this reviewed though. |
Added SshAgentCredentials for querying ssh-agent, SshUserKeyCredentials for authenticating with a given ssh key-pair. Introduced UsernameQueryCredentials which returns the supported credential types. Authentication exceptions are now translated from libgit2.
Hi Guys, how's going with ssh support in libgit2sharp? |
@nulltoken It's rebased atm. The only problem is getting the libssh2 native binaries alongside libgit2 ones. |
That part is what https://github.com/carlosmn/libgit2sharp/tree/cmn/managed-ssh was trying to bridge by not needing libssh2, but it would require our own version of the ssh library currently. |
Going down the route of having that managed ssh implementation can cause some issues such as:
This could work for now, I'm not saying no. If a PCL for SSH appears, it's easy to migrate. Just stating the available options. |
We wouldn't be the vendors for that library, it's a dependency the same way libssh2 is a dependency. The problems come when we're responsible for the updates, not when we use a library. Unfortunately there doesn't seem to be an ssh library with active support, so the point may be moot as we'd have to maintain some version of it. I don't get why having to compile an extra C library would be easier than using managed library for ssh if you wanna run it on a phone, IIRC you can't load native code on Windows Phone anyhow. |
@carlosmn it all depends on the type of the project. In example, SSH.NET is a simple .NET 4.0 library (as opposed to being a PCL - Portable Class Library), which could then be used as a common library between all the projects you have (WinPhone, Android, iOS, etc). That means, this specific library won't work in a mobile context. I was working on making LibGit2Sharp a PCL itself, so I could afterwards use it in a mobile application context, and ssh support would come via libssh2. |
What's the status on this? What exactly is blocking SSH support right now? |
There is still no good way to have ssh support in the libgit2 library that comes with the nuget packages. We've spent a lot of time and energy trying to find a solution to us becoming vendors of a crypto library, but so far no solution has presented itself. This has left little time to worry about landing this. |
Sadly enough, I went with NGit to get SSH working, would've loved to use the cleaner API of libgit2sharp |
Any updates on this? Crucial feature. The whole library is of no use without it. |
SSH support is in the bindings; the shipped libgit2 doesn't because we do not want to ship third-party crypto software in our packages. If there are missing features from this PR, please open a new one adding that. |
@carlosmn We should at least surface the API using feature checks. |
libgit2 knows whether it was built with ssh support so it'll error out on its own. I'm not a fan of the idea of the bindings doing feature checks themselves. |
Should there at least be a paragraph with all this info in README.md? I assure you, this matter is not absolutely clear to everyone willing to use this library. It would assist people a lot, if there was some guidance on ssh git checkout. For myself, I didn't manage to get through and found a workaround with NGit. But that one is so ugly and so very very slow, that I'm not happy at all. Too bad. |
Without a description (and a reasonable way) of how to use your own library, I don't know how useful that'd be. |
I'm confused... Is it supported or not ? I'm trying to clone a repository using SSH but I really can't find the way to do so. Some comments on the project tends to say it is supported, other say the opposite. Is it possible to have a clear statement on this please? I really think that issue should be addressed ASAP... Who wants to use password in their code while a SSH key can be used? Without this feature, this awesome library is quite limited. Thanks a lot for your work |
@leobuskin what version is it a fork of ? |
sadly, I have to use git command directly to support SSH. |
Added SshAgentCredentials for querying ssh-agent, SshUserKeyCredentials
for authenticating with a given ssh key-pair.
Introduced UsernameQueryCredentials which returns the supported credential
types.
Authentication exceptions are now translated from libgit2.
Supersedes #852