0 valid identities found when security find-identity

I execute command:

security find-identity

It shows:

Matching identities

4 identities found(including Developer ID Application, iPhone Developer, iPhone Distribution, Apple Development)

Valid identities only

0 valid identities found

But when I codesign using Developer ID Application, it works. And Xcode build app using iPhone Developer also is good.

So why security find-identity show 0 valid identities found?

Probably because you’re missing the WWDR intermediate, so there’s no path from the identity’s certificate to a trusted root. Try doing the following:

  1. Run Keychain Access.

  2. Select the certificate from one of the invalid identities.

  3. Choose Keychain Access > Certificate Assistant > Evaluate.

  4. Run through the process and see what you get.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thank you. But I have WWDR intermediate installed in keychain now.

I found a solution.https://support.securly.com/hc/en-us/articles/206980207-Why-do-i-get-the-This-root-certificate-is-not-trusted-error-

  1. Download the Securly certificate CRT file. (securly_ca_2034.crt)
  2. Navigate to Finder > Applications > Utilities > Keychain Access
  3. Select ‘System’ in the left-hand column.
  4. Open ‘File > Import Items’ and import the certificate file into the ‘System’ keychain.

Now it works!

0 valid identities found when security find-identity
 
 
Q