GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Introduce SSH functionality by Therzok · Pull Request #1072 · libgit2/libgit2sharp

Conversation

@Therzok

@Therzok Therzok commented Jun 4, 2015

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

EvAlex and KitsuneDev reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@Therzok

Therzok commented Jun 4, 2015

Copy link
Copy Markdown
Member Author

Taking some important bits into discussion:

  • libgit2 removed support for libssh2 embedding. What is the best way to make cmake look for libssh2 in a relative directory if it's not installed system-wide?

  • I'll have to update nativebinaries scripts to be able to deploy these things once I find out the above. So we can ship libssh2 + libgit2 binaries in one package! =D

  • We need some test on these things. Taken from previous PR:

    The ssh tests are a bit of a hassle to set up, but you can copy the code from libgit2's Travis script. I would recommend having at least one test run there to make sure basic functionality doesn't get broken.

  • Once we have a combination of packages, we can test both without and with SSH support, by conditionally checking that things throw a InvalidOperationException (probably should be a NotSupportedException) on querying SSH credentials when native binaries don't have support for that.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Therzok

Therzok commented Jun 4, 2015

Copy link
Copy Markdown
Member Author

cc @nulltoken

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mbos mbos mentioned this pull request Jun 8, 2015
Git repository using SSH mbos/Pass4Win#22
Closed
@Therzok

Therzok commented Jul 8, 2015

Copy link
Copy Markdown
Member Author

I'll rebase this as soon as possible. And I would like to have this reviewed though.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Therzok
Therzok force-pushed the therzok/ssh branch from 2f13063 to fa26649 Compare August 25, 2015 16:17
@Therzok
Introduce SSH functionality
802af9d
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.
@Therzok
Therzok force-pushed the therzok/ssh branch from fa26649 to 802af9d Compare August 25, 2015 16:24
@dannyzhan

dannyzhan commented Aug 27, 2015

Copy link
Copy Markdown

Hi Guys, how's going with ssh support in libgit2sharp?
I really need this feature in my project.
Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Therzok

Therzok commented Aug 27, 2015

Copy link
Copy Markdown
Member Author

@nulltoken It's rebased atm. The only problem is getting the libssh2 native binaries alongside libgit2 ones.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@carlosmn

carlosmn commented Aug 27, 2015

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Therzok

Therzok commented Aug 27, 2015

Copy link
Copy Markdown
Member Author

Going down the route of having that managed ssh implementation can cause some issues such as:

  • We're still shipping a ssh library, so the whole thing is still shipping a dependency (one of your arguments).
  • libssh2 could be compiled to target mobile apps and as a result, making libgit2sharp a PCL could be easier.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@carlosmn

carlosmn commented Aug 27, 2015

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Therzok

Therzok commented Aug 27, 2015

Copy link
Copy Markdown
Member Author

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nulltoken nulltoken mentioned this pull request Aug 28, 2015
SSH support libgit2/libgit2sharp.nativebinaries#7
Open
@CumpsD CumpsD mentioned this pull request Jan 8, 2016
Repository.Clone doesn't support SSH #255
Closed
@CumpsD

CumpsD commented Jan 8, 2016

Copy link
Copy Markdown

What's the status on this? What exactly is blocking SSH support right now?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@carlosmn

carlosmn commented Jan 12, 2016

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CumpsD

CumpsD commented Jan 12, 2016

Copy link
Copy Markdown

Sadly enough, I went with NGit to get SSH working, would've loved to use the cleaner API of libgit2sharp

snboisen reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@EvAlex

EvAlex commented Apr 10, 2016

Copy link
Copy Markdown

Any updates on this? Crucial feature. The whole library is of no use without it.

LukaLovreQ and Kira-NT reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@carlosmn

carlosmn commented Apr 20, 2016

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@carlosmn carlosmn closed this Apr 20, 2016
@Therzok

Therzok commented Apr 20, 2016

Copy link
Copy Markdown
Member Author

@carlosmn We should at least surface the API using feature checks.

piedar reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@carlosmn

carlosmn commented Apr 20, 2016

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@EvAlex

EvAlex commented Apr 22, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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.

manojbaishya reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@carlosmn

carlosmn commented Apr 25, 2016

Copy link
Copy Markdown
Member

Without a description (and a reasonable way) of how to use your own library, I don't know how useful that'd be.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ssougnez

ssougnez commented Nov 20, 2016

Copy link
Copy Markdown

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

Anika-, naice, seanamosw, michaelkruglos, LukaLovreQ, and manojbaishya reacted with thumbs up emoji
All reactions
  • 👍 6 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@leobuskin

leobuskin commented Nov 23, 2016

Copy link
Copy Markdown

@ssougnez you can use libgit2sharp fork with SSH support based on @Therzok work, available in NuGet under 'LibGit2Sharp-SSH' name.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rebizu

rebizu commented Dec 13, 2016

Copy link
Copy Markdown

@leobuskin what version is it a fork of ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rubberduck203 rubberduck203 mentioned this pull request Feb 8, 2017
Source Control: Type of git servers rubberduck-vba/Rubberduck#2663
Closed
@pascalberger pascalberger mentioned this pull request May 29, 2017
Is it possible to use Cake.Git with SSH? cake-contrib/Cake_Git#26
Closed
@dannyzhan

dannyzhan commented Jun 15, 2018

Copy link
Copy Markdown

sadly, I have to use git command directly to support SSH.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rotemwolfovich rotemwolfovich mentioned this pull request Aug 7, 2018
libgit2sharp-ssh :user cancelled certificate check exception #1600
Open
This was referenced Nov 11, 2018
WIP: Experimental no-TLS version libgit2/libgit2sharp.nativebinaries#77
Closed
Question: SSH Support #1422
Closed
@MakiWolf MakiWolf mentioned this pull request Oct 25, 2023
libgit2sharp SSH support? dotdevelop/dotdevelop#134
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@Therzok @dannyzhan @carlosmn @CumpsD @EvAlex @ssougnez @leobuskin @rebizu
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.