3
votes

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?

4
What does your build command look like in jenkins? - mkral
please try following link which may help you. stackoverflow.com/questions/13614657/… - Girish

4 Answers

2
votes

THe build machine you are using does not have the private key that matches the certificate that is inside the Provisional profile.

3
votes

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
1
votes

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)

0
votes

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.