[
https://issues.jenkins-ci.org/browse/JENKINS-13555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161976#comment-161976
]
Vinh Phuc Dinh commented on JENKINS-13555:
------------------------------------------
Ok, I finally tracked it down. The issue is detailed here:
http://stackoverflow.com/questions/9626447/unable-to-sign-ios-builds-with-jenkins
http://stackoverflow.com/questions/6827874/missing-certificates-and-keys-in-the-keychain-while-using-jenkins-hudson-as-cont
So seems that jenkins doesn't have access to the necessary keychain on startup
and subsequently fails.
The issue is rather severe, yet I haven't seen any report on this in jira, have
I missed something? Isn't this a problem everyone using the plugin will bump
into?
> XCode Plugin: Code signing issue after first restart (but project builds
> successfully when triggered through terminal)
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: JENKINS-13555
> URL: https://issues.jenkins-ci.org/browse/JENKINS-13555
> Project: Jenkins
> Issue Type: Bug
> Components: xcode
> Affects Versions: current
> Environment: MacOSX
> Reporter: Vinh Phuc Dinh
> Priority: Critical
> Attachments: log.txt
>
>
> After the installation of Jenkins, I installed, set up the xcode plugin and
> created a few jobs. They ran just fine but now, after a restart each build
> cancels with the error message:
> "Code Sign error: The identity 'iPhone Distribution' doesn't match any valid,
> non-expired certificate/private key pair in the default keychain"
> It looks like an issue with an unlocked keychain, but if I open up a
> terminal, log in as the 'jenkins' user and perform the commands manually:
> $ su jenkins
> $ /usr/bin/security list-keychains -s
> ${HOME}/Library/Keychains/jenkins.keychain
> $ /usr/bin/security default-keychain -d user -s
> ${HOME}/Library/Keychains/jenkins.keychain
> $ /usr/bin/security unlock-keychain -p ********
> ${HOME}/Library/Keychains/jenkins.keychain
> $ cd /Users/Shared/Jenkins/Home/jobs/Puzzle/workspace/Puzzle/
> $ /usr/bin/xcodebuild -alltargets -configuration Release clean build
> CONFIGURATION_BUILD_DIR=/Users/Shared/Jenkins/Home/jobs/Puzzle/workspace/build
> ...the build finishes successfully. (for the terminal calls, I replaced
> ${HOME} with my installation path /Users/Shared/Jenkins/Home/)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira