No code sign identities found: setting up jenkins

17,072

The core reason is Jenkins is running as daemon mode in Mac, just assume it is a different user - "Jenkins", so it will not have access to the keychain or provision profile as a you login using your credentials, which cause the code signing issue. I found I have following 2 errors

  1. "Code Sign error: There are no valid certificate/private key pairs in the default keychain"

Solution: Copy your iPhone developer certificate from "login" keychain to "System" keychain.

Detailed steps: open the "Keychain Access" application, click the login tab, right click the certificate like "iPhone Developer: your_name (XXXXXXX)", choose copy, then click the "System" tab, right click mouse, choose "Paste 2 items"; you might need to do the same thing with the certificate like "iPhone Distribution: your_name".

After doing this, you will get the second error.

  1. "Code Sign error: Provisioning profile 'xxxxx-xxxx-xxxx-xxxxx' can't be found"

Solution: Copy the provision profile to Jenkins user folder. The provision profile is under in the folder /YourUserName/Library/MobileDevice/Provisioning Profiles,

for example in my machine, the provision profile files are under /Users/steve/Library/MobileDevice/Provisioning Profiles In the mac, the Jenkins will be in /Users/Shared/Jenkins, create the following folder: /Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profile, then copy the .mobileprovision file to this folder.

After doing this, the code signing issues will be fixed. Hope my finding will be helpful to other Jenkins users.

Ref: http://code-dojo.blogspot.com/2012/09/fix-ios-code-signing-issue-when-using.html

Credit: Steve Zhang

Share:
17,072
prasad
Author by

prasad

Updated on July 20, 2022

Comments

  • prasad
    prasad almost 2 years

    Trying to setup jenkins for AdHoc Distribution, tried by using homebrew, mountain lion with xcode 5.

    Also tried using Jenkins App

    Following is the error returned by jenkins

    Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) 
    that match the provisioning profile specified in your build settings (‚xxxxxxx) were found.
    

    Project is getting successfully build using command line and in jenkins if I try for iPhone simulator then also its working fine.

    I would like to know any tutorial by which it will be easy to setup jenkins and also please let me know any specific steps needed to give access to keychains.

    any help really appreciated.