Xamarin:读取服务器证书B:证书验证失败

时间:2019-01-24 10:55:41

标签: macos ssl jenkins

也许某人可以帮助我解决这个问题:我有一个在Mac机器上运行的Jenkins作业。该项目是在Xamarin上开发的。在工作中,构建是这样开始的(Execute shell script):

# Installing dependencies
brew bundle
bundle install

# Run fastlane
bundle exec fastlane ci

在编译过程中,我收到以下错误消息:

[16:48:42]: -----------------------------------------
[16:48:42]: --- Step: make_changelog_from_jenkins ---
[16:48:42]: -----------------------------------------
[16:48:42]: Unable to read/parse changelog from jenkins: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
[16:48:42]: ------------------------------
[16:48:42]: --- Step: appcenter_upload ---
[16:48:42]: ------------------------------
[16:48:43]: Starting release upload...
[16:48:43]: Uploading release binary...
[16:49:29]: Binary uploaded
[16:49:30]: Release committed
[16:49:33]: Public Download URL: YYYY
[16:49:33]: Release XXXXX was successfully distributed to group "Collaborators"
[16:49:34]: Error adding to destination 400: {"release_notes"=>"Retrieving changelog failed.", "code"=>"bad_request", "message"=>"Destination does not exist."}
[16:49:34]: dSYM is found

Jenkins服务器具有已设置的自签名证书。我已经找到解决此read server certificate B: certificate verify failed错误的方法:SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

因此,我登录到Mac服务器并使用以下命令从Jenkins下载了证书:

openssl s_client -connect JENKINSSERVER:8443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > jenkins_cert.pem

然后我在Jenkins中更改了shell脚本,这开始了工作:

export SSL_CERT_FILE=/Users/user/Downloads/jenkins_cert.pem

if [ ! -f "$SSL_CERT_FILE" ]; then
    echo "Error: Could not find SSL_CERT_FILE '$SSL_CERT_FILE'"
    exit 1
fi

# Installing dependencies
brew bundle
bundle install

# Run fastlane
bundle exec fastlane ci

错误仍然存​​在。如果有人可以给我提示在哪里看会很好。如果您需要其他信息,我可以为您提供。

0 个答案:

没有答案
相关问题