Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

egit with self signed certificate, https

I would like to use a git repo that is accessigble through https, Https server has self signed certificate. I always get an error while trying to clone the repo with eclipse+egit:

https://host/path: cannot open git-upload-pack sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Is it possible to bypass this problem? I used export GIT_SSL_NO_VERIFY=1 command to skip ssl verification with the console client. This trick doesn't work with eclipse.

Thanks,

Hubi

like image 822
Hubidubi Avatar asked Nov 14 '11 15:11

Hubidubi


2 Answers

You can also just set eGit to ignore server verification. In Eclipse go to Window -> Preferences.

From there go to Team -> Git -> Configuration

Click "New Entry"

Key: http.sslVerify Value: false

Click "OK"

Click "OK"

For a more detailed approach to this check out my blog post here: http://www.pur-logic.com/2012/04/21/egit-self-signed-certificate/

like image 146
ossys Avatar answered Sep 28 '22 00:09

ossys


You have to import that certificate into your keystore (either the default keystore cacerts in your JDK directory or you specify one with the parameter -Djavax.net.ssl.trustStore).

like image 22
dunni Avatar answered Sep 27 '22 22:09

dunni