Can't find private key for Apple Development Push Services

38,073

Solution 1

My problem was that, for some reason the various certs were being added to the 'System' keychain instead of the 'login' one.

By selecting 'login' and then adding them with the little '+' (next to the i) they've been added to the right place.

Solution 2

I noticed that the expand icon is actually visible when clicking on 'My Certificates' in the left menu (Keychain).

Solution 3

What I faced, when I was creating CSR file, I was putting Common Name with a space. And the certificates created by this CSR file were not showing expand arrow in the Keychain Access

After I made a new CDR File with a short common name and recreated certificates, it installed well and has a private key.

enter image description here

Solution 4

on the machine you are trying to access this cert, do you have the key with which you signed the Certificate Signing Request (based on which apple created that certificate for you)?

You should ask the person who created that certificate. Thats probably the only way you can get the private key.

Solution 5

Goto the keychain access and follow steps as given below...

enter image description here

Share:
38,073
Ken Yu
Author by

Ken Yu

Updated on August 20, 2021

Comments

  • Ken Yu
    Ken Yu almost 3 years

    I've consulted many sources out there and still can't figure this out.

    http://code.google.com/p/apns-php/wiki/CertificateCreation

    Basically after I download the Development Push SSL Certificate from the iOS Provisioning Portal > App IDS (with Enable for Apple Push Notification service selected) and I double click the certificate (filename aps_development.cer) to open it, the Keychain opens. I then select "login" and "Certificates" on the left panels. On the right panel I see "Apple Development IOS Push Services:..." and all instructions I've consulted so far have told me to "expand" this option by clicking the arrow next to the name to reveal the private key, but there is no expand option for this certificate. Can anyone help me find this private key? Did I download the wrong certificate?

    Thanks

  • Ken Yu
    Ken Yu over 11 years
    When I signed the CSR, I got a certificate "iPhone Developer:[name]" with a private key "iOS Developer:[name]" along with it. Is this the private key that I should use for my apns-dev-key?
  • Ken Yu
    Ken Yu over 11 years
    It worked when I removed the existing Development Push SSL Certificate and created a new one with my own certificate generated from CSR, but there has to be a way around this for other team members to be able to access the private key when they download the certificate, right?
  • Nitin Alabur
    Nitin Alabur over 11 years
    Yes. and that way, is to export (right click on the certificate in keychain and export) the cert-key pair (or just the key) to your team members. That way, when your team members double click the certificate-key pair, both these will be loaded onto the keychain
  • kev
    kev about 10 years
    @KenYu where did you get 'your own certificate generated from CSR' from? I am just able to get a CertificateSigningRequest.
  • Sung Kim
    Sung Kim over 8 years
    For me, this actually addressed my problem. Thanks!
  • jfredsilva
    jfredsilva over 8 years
    This addressed my problem too
  • Nitin Alabur
    Nitin Alabur over 8 years
    you upload the CSR in the dev portal. after that, you can download the signed certificate from the portal
  • Andrew Duncan
    Andrew Duncan about 8 years
    I just dragged the icon from the System keychain to the login one to solve this same problem. Too simple!
  • Andrew Plummer
    Andrew Plummer almost 8 years
    This is actually insane UX.
  • huggie
    huggie almost 8 years
    BTW, do we actually generate a pair of keys and a certificate for each app? I found it so messy I have trouble locating which app with which key and certificate.
  • Anchor
    Anchor over 7 years
    My god, THANK YOU. Why is this a thing. This should not be a thing.
  • Firze
    Firze over 7 years
    I had the same issue but my common name was empty so it didn't work. Adding name helped!
  • Amit Garg
    Amit Garg over 7 years
    I had same issue and your response helped me. I was trying to generate push certificates on a new macbook. But when I switched back to my old mac, it worked. My old mac will probably die soon, what certs/keys, etc should i export off my old mac on the new one and keep a back up?
  • Nitin Alabur
    Nitin Alabur over 7 years
    Any cert/key pair related to apps in production / appstore, also the ones used for APNS, and the private keys related to your apps.
  • Shobhit C
    Shobhit C about 7 years
    Did the work for me. For some (like me), who are not able to find the "+" key, its at the bottom left section.
  • Sharique Abdullah
    Sharique Abdullah about 7 years
    Good one, Thanks !
  • Admin
    Admin about 7 years
    I spend all night because of this issue.
  • Jakob
    Jakob almost 7 years
    I wonder how many working hours this bug causes. Thanks - that helped!
  • Josh Rosen
    Josh Rosen almost 7 years
    I believe this has fixed my no-dropdown-arrow situation as well. Crazy.
  • vahotm
    vahotm over 6 years
    I didn't get the point. Was the problem with space or with name length? If it was length - then what is the limit?
  • Vaibhav Saran
    Vaibhav Saran over 6 years
    Space was the issue.
  • ajeet sharma
    ajeet sharma over 6 years
    Good one, Worked for me. Thanks!
  • John Rogers
    John Rogers about 5 years
    This is the correct answer. For some reason, 'All Items' does not show the pair as a pair, only the certificate!
  • heyfrank
    heyfrank over 4 years
    This answer helped, all others didn't (macOS 10.14.5).
  • Josef Habr
    Josef Habr almost 4 years
    I spent the whole morning wondering why I don't get the tiny triangle. Thanks!
  • Josef Habr
    Josef Habr almost 4 years
    I don't think you can import CSR in the keychain...
  • Swappy Dwappy
    Swappy Dwappy almost 4 years
    This fixed mine, Thanks!
  • ANeme
    ANeme over 3 years
    thanks you saved my life, how come apple accept us to add name with space when this cause an issue!!!
  • Chanchal Raj
    Chanchal Raj about 2 years
    I wasted my time by deleting and recreating certificates many times. Thanks, it helped.