1

I was trying to generate a new APNs certificate for my app on our build server but when I got to the "Export 2 items" step for the Certificate and Private Key, I found that I didn’t have two items. My certificate didn’t have any private key with it.

I can see in my keychain that the certificate belongs to the System keychain whilst the public and private key are in my CI-Jenkins keychain.

I repeated the process on my development machine and it worked fine there.

The only difference being that the build server is currently set to use our custom CI-Jenkins keychain as opposed to the default login keychain.

Anybody knows what is happening there and if it makes sense? Do I need to swap keychain before generating the certificate and then swap back on my build server?

m.y
  • 691
  • 9
  • 21
  • do you generate the CSR in same machine? I have similar problem previously and I re-create the cert step by step and then download the newly created cert to make it work. – Surely Jan 22 '16 at 12:20
  • yeah i created the CSR using Keychain on the same machine. I just tried again now and still same result. The certificate ends up in the System keychain and the key in my CI-Jenkins keychain – m.y Jan 22 '16 at 14:54
  • Hi, I am not quire sure how to fix it. Just a suggestion, you can try to remove the related items in your keychain and re-do the whole process again. – Surely Jan 23 '16 at 04:52

1 Answers1

7

The solution is to just drag the certificate from the System keychain to the login keychain. Then it will automatically associate the correct private key with it.

Trevor Gehman
  • 4,645
  • 3
  • 22
  • 25