Jenkins Git fatal: unable to access 'https//URL.git': SSL certificate p‌r‌o‌b‌l‌e‌m: self signed certificate

浪尽此生 提交于 2019-12-06 14:03:05

I don't know if you have found the answer already by yourself. In case, please have a look at the answer at Jenkins git plugin self signed certificate

Basically, the git-client plugin in jenkins is using a different config file than the git.exe itself is using. The config I had to adapt was located at

C:\Program Files\Git\mingw64\etc\.gitconfig

Also please note that you should not disable the ssl verification but instead tell git where to find information about the self signed certificate to make it work. You can find the general instructions in the question at the given link.

Make sure you have set

  1. Set Git path in Manage Jenkin>Global tool configuration
  2. Set Credential for the URL: If you are using HTTPS git repo URL then use your git credential, if you are using SSH then go with certificates

Additionally, Although you have ran the command,

git config http.sslVerify "false",

In local git bash, it will not effect jenkin.

You can remove this error in Jenkin, first create a new free style project and just add "Window Batch Command" in Build step add command

git config http.sslVerify "false"

and save it and ran the job.

Once this is done, your Jenkin is configured to bypass the ssl verification. Now you can remove this build step and try to clone the project in SCM.

.

I am behind corporate firewall and Jenkins was missing the certificate of Bitbucket in its java trust-store "$JAVA_HOME/jre/lib/security/cacerts" or "$Jenkins_home/jre/lib/security/cacerts" (depends on which Java executable you are using in 'jenkins.xml' file).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!