Jenkins Git integration - How to disable SSL certificate validation

后端 未结 7 812
执念已碎
执念已碎 2020-12-30 04: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

相关标签:
7条回答
  • 2020-12-30 04:56

    to supplement, I've stuck on this for few hours, here's what i've found for SSL related

    add

    -Dorg.jenkinsci.plugins.getclient.GitClient.untrustedSSL=true 
    

    as parameter as java jnlp command,

    and to set GIT_SSL_NO_VERIFY=true as environment variable, so the start slave command at slave side now looks like (not sure if some parameteres are duplicate)

    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
    

    you may need the same

    -noCertificateCheck
    

    while trying to call jenkins-cli.jar

    (up to https://blog.csdn.net/froghui/article/details/39641221)

    since everytime the jenkins slave initiazted a git operation, it's a clean env, that handled by jenkins git plugin

    0 讨论(0)
提交回复
热议问题