1

I am using Git as Source Code Management(SCM) in Jenkins. (using a GitHub Token)

However, whenever I run the job, I get stderr: fatal: unable to access '<url>': SSL certificate problem: unable to get local issuer certificate error.

git config --global http.sslVerify false does not solve the issue.

Because in Jenkins, SCM is the first step for the job.

1 Answers1

0

but in Jenkins, it doesn't work because SCM is the first step for the job.

It should still work, unless the SCM step is done on the agent side.

In which case you might consider:

  • the same global Git config done on the agent workstation
  • launching the agent with (as described here)

    export GIT_SSL_NO_VERIFY=true
    
    java -Dorg.jenkinsci.plugins.getclient.GitClient.untrustedSSL=true -jar slave.jar \
         -jnlpUrl ${jenkins_url}/computer/${slave_name}/slave-agent.jnlp -secret ${secret} \
         -noCertificateCheck
    
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • where should I put this command `git config --global http.sslVerify false`. I forgot to mention that I was putting it in `Build` - `Execute Shell` –  Mar 15 '19 at 19:43
  • @RayZ The SCM step is separate and preced the build step. The global config would be done on the server and on the agent, with the user running Jenkins. – VonC Mar 15 '19 at 20:17