Jenkins - Xcode build works codesign fails

前端 未结 11 2365
夕颜
夕颜 2020-11-30 19:14

Below is my build script (not using xcodebuild plugin).

  1. Build step works
  2. I have created a separate keychain with the required certs and private keys
11条回答
  •  温柔的废话
    2020-11-30 20:00

    I copied all the certs/private keys to a new keychain (you can right-click on the items and simply copy and paste). In the new keychain, right-click on each private key, Get Info -> Access Control and make the keys available to all apps.

    Importantly, in the upper left of the Keychain app is the list of keychains. Re-order them so that the new keychain is first in the list.

    Another answer I found gave the build step to unlock this keychain during the build:

    KEYCHAIN=/Users//Library/Keychains/codesign.keychain
    
    # the -s option adds $KEYCHAIN to the search scope, while the -d option adds $KEYCHAIN to the system domain; both are needed
    security -v list-keychains -d system -s $KEYCHAIN
    security -v unlock-keychain -p  $KEYCHAIN
    

提交回复
热议问题