如何在Jenkins的workSpace / Slave上禁用证书验证

问题描述 投票:1回答:1

我在Jenkins中使用Git作为源代码管理(SCM)。 (使用GitHub令牌)

但是,每当我运行这份工作时,我都会得到stderr: fatal: unable to access '<url>': SSL certificate problem: unable to get local issuer certificate错误。

git config --global http.sslVerify false没有解决这个问题。

因为在詹金斯,SCM是这项工作的第一步。

git jenkins github github-api
1个回答
0
投票

但在詹金斯,它不起作用,因为SCM是这项工作的第一步。

它应该仍然有效,除非SCM步骤在代理端完成。

在这种情况下,您可以考虑:

  • 在代理工作站上完成相同的全局Git配置
  • 启动代理商(如described hereexport 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
© www.soinside.com 2019 - 2024. All rights reserved.