Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Disabling SSL Verification / Using Self-Signed Certs

Thanks for the input, but what I'm looking for is bypassing the public certificate verification, which is SSL. It is possible in JGit as per http://git.eclipse.org/c/jgit/jgit.git/commit?id=d49530ad861ee7053ca1a92d619f127b5d6bc3a1, but I'm having difficulty in using it in my java code which used JGit. Please let me know your ideas on how to do this.

On Sun, Mar 3, 2013 at 6:15 PM, Aldrin Leal <aldrin@xxxxxxxxxxx> wrote:
Seems this not SSL verification, but SSH Verification. 


--
-- Aldrin Leal, <aldrin@xxxxxxxxxxx>
Master your EC2-fu! Get the latest ekaterminal public beta http://www.ingenieux.com.br/products/ekaterminal/


On Sun, Mar 3, 2013 at 9:09 AM, Isuru Haththotuwa <isurulucky@xxxxxxxxx> wrote:
Ping! Any idea, anyone?


Hi,

As per http://git.eclipse.org/c/jgit/jgit.git/commit?id=d49530ad861ee7053ca1a92d619f127b5d6bc3a1 , jgit supports disabling SSL verification, but I'm not quite sure how to use it in my code. As explained in the above link, I added 'http.sslVerify' and 'false' as a key value pair and set them as a configuration parameter:

public class CustomJschConfigSessionFactory extends JschConfigSessionFactory {
    @Override
    protected void configure(OpenSshConfig.Host host, Session session) {

        java.util.Properties config = new java.util.Properties();
        config.put("http.sslVerify", false);      
        session.setConfig(config);
    }
}

and then I used an instance of this custom session factory class to populate the SSHSessionFactory:

SshSessionFactory.setInstance(new CustomJschConfigSessionFactory());
 
But, after doing this I still get the error:

org.eclipse.jgit.api.errors.TransportException: https://182.161.22.228:8443/git/xyzrepo1.git: cannot open git-upload-pack

What have I done wrong here in disabling SSL verification? Please let me know the correct way of doing it.

--
Thanks and Regards,
Isuru

_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jgit-dev





--
Thanks and Regards,
Isuru

Back to the top