Import Private Key to KeyChain



Importing Private key to the Keychains sometimes throws an error, but if you use the security command to import via Terminal, there is no error at all. Its probably a bug with the Keychains App.

To import Private Key to key to Keychains using Terminal, type the following in the Terminal, where the *.p12 file is the private key and *.pem file is the cert, login.keychain refer to the the current login user's keychains store.
security import PushFeedKey.p12 -k ~/Library/Keychains/login.keychain
security import PushFeedCert.pem -k ~/Library/Keychains/login.keychain

security import DeveloperKey.p12 -k ~/Library/Keychains/login.keychain
security import DeveloperCert.pem -k ~/Library/Keychains/login.keychain

Comments

Post a Comment