Skip to content

libgit2sharp-ssh :user cancelled certificate check exception #1600

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

Open
rotemwolfovich opened this issue Aug 7, 2018 · 6 comments
Open

libgit2sharp-ssh :user cancelled certificate check exception #1600

rotemwolfovich opened this issue Aug 7, 2018 · 6 comments

Comments

@rotemwolfovich
Copy link

rotemwolfovich commented Aug 7, 2018

Reproduction steps

win7/win 10 using the libgit2sharp-ssh 1.0.2
clone repository using app written in visual studio 2015 update 3
throw exception : "user cancelled certificate check"
(when cloning using gitBash not with code works fine )

Expected behavior

clone via https under corporate proxy

Actual behavior

my app was using libgit2sharp version 0.22.0 and everything was working fine, also under corporate proxy .
after updating the dll to libgit2sharp-ssh i get the exception : "user cancelled certificate check" when using https/http (ssh option works ok)

Version of LibGit2Sharp (release number or SHA1)

ibgit2sharp-ssh 1.0.2

Operating system(s) tested; .NET runtime tested

C# .net 4.5

is libgit2sharp-ssh not support proxy ?
if not, how can i implement connection to git with https/http and ssh with corporate proxy .

@ethomson
Copy link
Member

ethomson commented Aug 7, 2018

I'm not familiar with LibGit2Sharp-SSH. Looks like this is something that somebody else has cooked up, and it's based on a very old LibGit2Sharp. I would encourage you to reach out to them.

@rotemwolfovich
Copy link
Author

rotemwolfovich commented Aug 7, 2018

there is some version of libgit2sharp that support ssh ? except LibGit2Sharp-SSH

when i use the 0.22 version i also got the exception : "user cancelled certificate check"
do you know why its happening ?

@ethomson
Copy link
Member

ethomson commented Aug 7, 2018

Not as a nuget package. We do not provide builds of libssh2 - you would need to build it yourself.

"User cancelled certificate check" means that there's an untrusted certificate. You should either use a certificate on your server that is trusted by your system, or provide a certificate hook check to accept it. Technically speaking, you can also turn off all git's certificate checking, but I don't recommend it.

@rotemwolfovich
Copy link
Author

rotemwolfovich commented Aug 7, 2018

Ok , is it possible that if i am working under company proxy i will get this exception as well ?.
because when i tried to clone in a different network ( home network for example ) everything was working fine . ( i am referring to the libgit2sharp version 0.22.0 )

Thank you !!!

@ethomson
Copy link
Member

ethomson commented Aug 7, 2018

Yes, if the corporate proxy is presenting a self-signed certificate, or one that was not issued with a trusted cert chain. This is common in corporate proxies.

@rotemwolfovich
Copy link
Author

thank you for clearing this up .
do you know if there is a plan to add the ssh support ? the latest status i found was from 2016 (in this issue : Introduce SSH functionality #1072)
do you know on which version of libgit2sharp the libgit2sharp-ssh is base on ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants