Jenkins Git integration - How to disable SSL certi

2020-02-26 07:28发布

I am getting the below error while creating a job from Jenkins. How do I disable certificate validation in Jenkins?

From Git Bash I can use git config --global http.sslVerify false command to disable it, but not sure how to use it from Jenkins.

Error:

Failed to connect to repository : Command "C:\Program Files (x86)\Git\cmd\git.exe ls-remote -h url ofmy repository.git HEAD" returned status code 128:
stdout:
stderr: fatal: unable to access 'url of my git/': SSL certificate problem: self signed certificate in certificate chain

7条回答
Root(大扎)
2楼-- · 2020-02-26 08:01

I had the same problem. First i used Git using a Shell Script that disabled the SSL Verification before the clone or pull.

Later i switched to using JGit instead which works as expected (though its not recommended to use). However with JGit you some features such as shallow clones are not supported.

Afair i didn't have to install anything to use JGit

查看更多
登录 后发表回答