I want to archive my app for distribution on two computers. I exported the private key successfully and imported it to my second machine, however run into errors when imported t
When you export you private key, you should get a .p12 file. Import that file on the other machine. It should have everything in it you need. You don't need to specifically export and import the public key.
Same as DougW,
But first you must directing your terminal to directory of the key
Then change the pub_key to the name of key you will import
Example:
your key on folder Documents , and the key name is my_login.pem
So, you must write in terminal
$ cd Documents
$ security import my_login.pem -k ~/Library/Keychains/login.keychain
But be careful, you must need a backslash if you key name like
$ security import \<my_login.pem\> -k ~/Library/Keychains/login.keychain
Backslash for escape character as text
https://ubuntuforums.org/showthread.php?t=1976408
Don't understand the backslash here
For Your Information
And you can import keychains with change the directory, the directory show in here
keychains directory
just let your pointer on the kind of keychain you want to know
So it will be like this
security import **yourkeyname** -k ~/Library/Keychains/System.keychain
BE CAREFUL with this
You must know what you do
It's been broken since 2009 as reflected in this bug report.
In case that report wanders off the internet, here's the relevant instructions to import a public key pem file. You'll want to execute this in Terminal.
security import pub_key.pem -k ~/Library/Keychains/login.keychain