简体   繁体   中英

Code Sign error when building using jenkins xcode build plugin

I get the following error when using the XCodeBuild plugin of jenkins:

Code Sign error: The identity 'iPhone Developer' doesn't match any valid, non-expired certificate/private key pair in your keychains

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?

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.

Instead of running Jenkins as a daemon, you should just launch it like a normal process. It would probably looks like something like this:

java -jar /Applications/Jenkins/jenkins.war

您正在使用的构建计算机没有与临时配置文件中的证书匹配的私钥。

I also run jenkins as a daemon and code signing works fine using the plugin:

https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin

(Jenkins 2.19.1 with Xcode 8)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM