I'm running Jenkins agent in K8s nodes.
I add git config --global http.sslVerify false in dockerfile. I also add ~/.gitconfig in dockerfile too.
I try to use Jenkins checkout and git in pipeline to fetch codes, but I got following error:
stderr: fatal: unable to access 'https://gitlab-ops.prod.hccn/iac/gitops/vsphere_linux.git/': SSL certificate problem: unable to get local issuer certificate
But if I replace them by sh git clone command, it's ok.
So here are my questions:
git config --global http.sslVerify falseis only works forgitcommand, don't work for Jenkinscheckoutandgit, right? Becausegitcommand is a sh command, but Jenkinscheckoutgitis some kind of Java plugin?- Is Jenkins
checkoutalso referencegitorgitclientplugin? - How to disable Jenkins
checkoutandgitplugin SSL verify? I don't find them on jenkins git-client plugin or jenkins git plugin or jenkins scm plugin
Supplement:
- I run
git config --global http.sslVerify falseon each k8s node - Jenkins Version is 2.277.4
- Jenkins Git Plugin Version is 4.7.1
- Jenkins Git Client Plugin Version is 3.7.1
Supplement 2:
I have 2 git project. The Jenkinsfile is in the first one, which configure in the Jenkins Job. The default checkout is working well. During the pipeline running, it will try to pull another git project on the Jenkins agent, this is where the problem arises.
