I get the following error when using the XCodeBuild plugin of jenkins:
在使用jenkins的XCodeBuild插件时,我得到以下错误:
Code Sign error: The identity 'iPhone Developer' doesn't match any valid, non-expired certificate/private key pair in your keychains
代码符号错误:标识“iPhone开发人员”不匹配您的密钥链中的任何有效的、未过期的证书/私钥对
Update: I am able to xcodebuild from terminal and build in xcode to simulator and to device however not when running it in jenkins - jenkins seems to have some different 'shared' osx user because its home folder is in users/shared?
更新:我可以从终端构建xcode,并在xcode中构建到模拟器和设备,但在jenkins中运行时却不是这样——jenkins似乎有一些不同的“共享”osx用户,因为它的主文件夹在用户/共享中?
4 个解决方案
#1
2
THe build machine you are using does not have the private key that matches the certificate that is inside the Provisional profile.
您正在使用的构建机器没有与临时配置文件中的证书匹配的私钥。
#2
3
By default when Jenkins is installed it runs as a daemon as opposed to a process under your current user. As such it does not have access to any of your credentials which are needed to code sign your app.
默认情况下,当安装Jenkins时,它将以守护进程的形式运行,而不是当前用户下的进程。因此,它无法访问您的任何凭证,这些凭证是编写应用程序签名所需的。
Instead of running Jenkins as a daemon, you should just launch it like a normal process. It would probably looks like something like this:
与其将Jenkins作为守护进程运行,不如像正常进程一样启动它。大概是这样的:
java -jar /Applications/Jenkins/jenkins.war
#3
1
I also run jenkins as a daemon and code signing works fine using the plugin:
我还把jenkins作为一个守护进程,代码签名使用插件很好:
https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/Keychains +和+配置+简介+插件
(Jenkins 2.19.1 with Xcode 8)
(Jenkins 2.19.1, Xcode 8)
#4
0
It's not the build machine, but the user doing the build. He's missing those certificate and private key. You need to manually add a login.keychain especially for him.
它不是构建机器,而是用户在做构建。他丢失了那些证书和私钥。您需要手动添加登录。钥匙链尤其是对他。
#1
2
THe build machine you are using does not have the private key that matches the certificate that is inside the Provisional profile.
您正在使用的构建机器没有与临时配置文件中的证书匹配的私钥。
#2
3
By default when Jenkins is installed it runs as a daemon as opposed to a process under your current user. As such it does not have access to any of your credentials which are needed to code sign your app.
默认情况下,当安装Jenkins时,它将以守护进程的形式运行,而不是当前用户下的进程。因此,它无法访问您的任何凭证,这些凭证是编写应用程序签名所需的。
Instead of running Jenkins as a daemon, you should just launch it like a normal process. It would probably looks like something like this:
与其将Jenkins作为守护进程运行,不如像正常进程一样启动它。大概是这样的:
java -jar /Applications/Jenkins/jenkins.war
#3
1
I also run jenkins as a daemon and code signing works fine using the plugin:
我还把jenkins作为一个守护进程,代码签名使用插件很好:
https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/Keychains +和+配置+简介+插件
(Jenkins 2.19.1 with Xcode 8)
(Jenkins 2.19.1, Xcode 8)
#4
0
It's not the build machine, but the user doing the build. He's missing those certificate and private key. You need to manually add a login.keychain especially for him.
它不是构建机器,而是用户在做构建。他丢失了那些证书和私钥。您需要手动添加登录。钥匙链尤其是对他。