Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

export public key from keychain access

Tags:

xcode

ios

iphone

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 the public key.

Everywhere I search people always mention only exporting of the private key - why is that? how can I export the public key and transfer it successfully? what am I doing wrong?

like image 618
TommyG Avatar asked Jan 15 '12 23:01

TommyG


People also ask

Can Apple keychain be exported?

In the Keychain Access app on your Mac, select the items you want to export in the Keychain Access window. Choose File > Export Items.

Can you transfer keychain from one Mac to another?

If you migrate your data to a different Mac using Setup Assistant, your keychains are automatically transferred to the new computer. If you didn't use Setup Assistant, the best way to copy your keychains to a new computer is to export and then import them using Keychain Access.

How do I export my private keychain key Mac?

To export your private key and certificate, open the Keychain Access Application and select the "Keys" category. Control-click the private key associated with your iOS Distribution Certificate and click Export Items in the menu.

Where are Mac keychains stored?

The Keychain Access app is located in the Utilities folder in your Applications folder. If you launch it, you'll see a number of items in the sidebar: different keychains, such as Login, and, if you have the iCloud Keychain active (see below), you'll see an entry for that.


2 Answers

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
like image 80
DougW Avatar answered Nov 10 '22 14:11

DougW


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.

like image 41
jimmyg Avatar answered Nov 10 '22 14:11

jimmyg