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 false
is only works forgit
command, don't work for Jenkinscheckout
andgit
, right? Becausegit
command is a sh command, but Jenkinscheckout
git
is some kind of Java plugin?- Is Jenkins
checkout
also referencegit
orgitclient
plugin? - How to disable Jenkins
checkout
andgit
plugin 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 false
on 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.