Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] Specifying http.sslVerify from a Configuration File or in the Runtime


I need to use jgit without checking for certs (http.sslVerify=false). As per the instructions I got in the mail thread with the subject 'Disabling SSL Verification / Using Self-Signed Certs', I used a FileBasedConfig for this. 

        File file = new File("/home/fox/test/disableSsl.gitconfig");
        FileBasedConfig config = new FileBasedConfig(file, FS.DETECTED);

contents of the file based config are:

sslVerify = false

I still get the certificate error. If I simply comment out the check for http.sslVerify and disable certificate validation by default in jgit/Transport/TransportHttp class, it works without an issue. 

I have used a separate .gitconfig format file here, not the config file in the .git folder in the local repo.

Please let me know correct way to http.sslVerify to false or specify this option at runtime.

Thanks and Regards,

Back to the top