Missing private key for signing certificate when choose fastlane match provision files

Viewed 440

when I choose the match provision profile in Xcode 12.5.1, shows this error:

Missing private key for signing certificate.
Failed to locate the private key matching certificate "Apple Distribution: Xiaoqiang Jiang (6JP4P88ZJB)" in the keychain. To sign with this signing certificate, install its private key in your keychain. If you don't have the private key, select a different signing certificate for CODE_SIGN_IDENTITY in the build settings editor.

It tell me the certificate on the keychain did not contain private key, then I open the keychain and found it contains private key.

enter image description here

why would this happen and what should I do to fix it? why still tell me did not contain private key even if the privated key imported in keychain?

1 Answers

I had the same issue and restarting xcode fixed it for me.

Related