I am trying to resign a package using a script from Docebo.
But I got an error when running the script error: The specified item could not be found in the keychain.
So I ran security find-identity and I got a 0 Valid identity message.
But I can see these certificates installed in my keychain and downloaded a brand new mobile provissioning profile.
No dice...
any ideas?
OK. That suggests that you have the certificate but not the private key. To confirm that:
-
In Keychain Access, choose Certificates at the top.
-
Find your certificate there.
-
Now switch to My Certificates.
-
Is it still there?
To sign code you need a code-signing identity, that is, a code-signing certificate and the private key that matches the public key in that certificate. If you only have the certificate, you can’t sign because you’re missing the private key.
It’s very common for folks to lose their private key. For some backstory on that, see Certificate Signing Requests Explained.
Fortunately, for Apple Distribution that’s easy to fix: Just generate a new distribution certificate.
IMPORTANT This fix make sense for most, but not all, certificate types. One that can cause real problems is the Developer ID signing identities use for directly distributed macOS products. If you do end up working on the Mac, see The Care and Feeding of Developer ID.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"