I am integrating code signing into our builds and have created a custom keychain which is held within the source code tree and used to sign the code (it's copied to ~/Library/Keychains
before being used, so it's in a well known location).
However when attempting to sign I get an error:
$ /usr/bin/codesign --sign='Mac Developer: John Doe (AA1AAA1AAA)' \
--keychain=~/Library/Keychains/xxx.keychain \
dist/64/gmake/release/bin/libmylib.dylib
Mac Developer: John Doe (AA1AAA1AAA): no identity found
However:
$ security find-identity -p codesigning ~/Library/Keychains/xxx.keychain
Policy: Code Signing
Matching identities
1) 49F2FBE79899DF18A9638AC6B1302E2EB6E079AD "Mac Developer: John Doe (AA1AAA1AAA)"
1 identities found
Valid identities only
1) 49F2FBE79899DF18A9638AC6B1302E2EB6E079AD "Mac Developer: John Doe (AA1AAA1AAA)"
So I don't understand why codesign
is unable to find the identity.
Can anyone suggest a solution?
Note that I have also tried with the identity's SHA-1, with the same result.
~
if I specify the arguments in this way. I will test tomorrow and get back to you, however I think you are onto a winner. – Sabrinasabsay