1
votes

After been update to Sierra(osx 10.12) on my mac, the jenkins could not compile ios items successfully as before. It always failed with iPhone Distribution: Haitao Song (XXXXXXXXXX): ambiguous (matches "iPhone Distribution: Haitao Song (XXXXXXXXXX)" and "iPhone Distribution: Haitao Song (XXXXXXXXXX)" in /Users/Shared/Jenkins/Library/Keychains/login.keychain-db.

I didn't find any expired certificates from Keychain

I have used /usr/bin/security find-identity /Users/Shared/Jenkins/Library/Keychains/login.keychain-db to check keychains, result as below:

Matching identities

1) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "iPhone Distribution: Haitao Song (XXXXXXXXXX)"

Valid identities only

1) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX "iPhone Distribution: Haitao Song (XXXXXXXXXX)"

Who can tell me what's the differences between Matching identities and Valid identities.Can I delete one of them to eliminate ambiguous, or how can I fix this.

BTW, I have specified Code Signing Identity to Haitao Song (XXXXXXXXXX) on my xcode plugin configuration, and my xcode version is still 7.3.1

Below is Error Details, it happened at Packaging IPA.

Codesigning '' with 'iPhone Distribution: Haitao Song (XXXXXXXXXX)'

  • /usr/bin/codesign --force --preserve-metadata=identifier,entitlements --sign iPhone Distribution: Haitao Song (XXXXXXXXXX) --entitlements /var/folders/wq/rn3bp1x96bn0sbxtzhvj3yk400008l/T/75lOkNdlo1/entitlements_plistgpzcqk6a /var/folders/wq/rn3bp1x96bn0sbxtzhvj3yk400008l/T/75lOkNdlo1/Payload/test.app Program /usr/bin/codesign returned 1 : [iPhone Distribution: Haitao Song (XXXXXXXXXX): ambiguous (matches "iPhone Distribution: Haitao Song (XXXXXXXXXX)" and "iPhone Distribution: Haitao Song (XXXXXXXXXX)" in /Users/Shared/Jenkins/Library/Keychains/login.keychain-db)
1

1 Answers

0
votes

Step 1: run security find-identity -v -p codesigning

Step 2: locate the lines of the CodeSigning with iPhone Distribution: Haitao Song (XXXXXXXXXX), which may look like

1) FF9E1C12A6FE7028211B0123450D2F9845481DE0 "iPhone Distribution: Haitao Song (XXXXXXXXXX)"

and FF9E1C12A6FE7028211B0123450D2F9845481DE0 is the SHA1 of your ambiguous identities

Step 3: run security delete-certificate -Z FF9E1C12A6FE7028211B0123450D2F9845481DE0 to remove the wrong identities

Step 4: create a new cert on Apple Developer Center, download and add it to your keychain

Step 5: re-generate all mobile provision profiles with new cert which be generated by the old cert