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)