Skip to main content

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

In debugging through the jgit source, I found that jgit looks for the entry sslVerify in section http in the local repository's config file (in the .git directory), in /home/fox/.gitconfig and /usr/etc/gitconfig. Is this the intended behavior? Is it not possible to make jgit read a .gitconfig format file other than these?

On Tue, Apr 16, 2013 at 3:15 PM, Isuru Haththotuwa <isurulucky@xxxxxxxxx> wrote:

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,

Thanks and Regards,

Back to the top