尝试通过 HTTPS 访问时如何阻止 Jenkins 使用 TEST SITE 证书

How to stop Jenkins from using TEST SITE certificate when attempting to access through HTTPS

我很难尝试让 HTTPS 与我们的 Jenkins 框一起工作(Mac Pro 2014 / OSX Mavericks / Jenkins Mac 安装程序)。

按照 Jenkins-CI 底部的说明进行操作后:

sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

sudo defaults write /Library/Preferences/org.jenkins-ci httpsPort 8443
sudo defaults write /Library/Preferences/org.jenkins-ci httpsKeyStore /path/to/your/keystore/file
sudo defaults write /Library/Preferences/org.jenkins-ci httpsKeyStorePassword <keystore password>

sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist

访问https://myjenkins.com:8443时我的证书仍然无效。查看证书后,看起来 'TEST SITE' 证书仍在使用中。

我尝试了以下操作:

非常感谢任何帮助!

我只是 运行 遇到了同样的问题,问题是 jenkins-runner.sh 脚本没有将 httpsPrivateKey 和 httpsCertificate 变量从 plist 文件传递​​到用于启动 Jenkins 的命令行。我将这两行添加到 jenkins-runner.sh 来修复它。

add_to_args httpsPrivateKey
add_to_args httpsCertificate

该文件在我机器上的 /Library/Application Support/jenkins 目录中。您应该能够通过查看 /Library/LaunchDaemons/org.jenkins-ci.plist 文件找到计算机上的位置。