2

I am trying to link my Codemagic account to Apple with "Apple Developer Portal integration". I followed the official instructions but when I try to upload my p8 key I get this error:

Invalid API Key
Please select a .p8 private key

I double-checked and my file looks fine. When opened in a text editor it looks like this:

-----BEGIN PRIVATE KEY-----
M............Y
-----END PRIVATE KEY-----

In total it has 203 letters/digits (not sure how many should be there).

Is this a problem with my certificate? Or is Codemagic mixing something up?

Mikhail Tokarev
  • 2,843
  • 1
  • 14
  • 35
Nearchos
  • 153
  • 1
  • 11

1 Answers1

1

First, try to make sure that the original name of the .p8 file contains your Key ID. If the Key ID is 4X5V82XXXX, the certificate name would be AuthKey_4X5V82XXXX.p8.

Second, try to re-generate the key along with the certificate, the certificate may have expired (it is valid for 12 month)

Note, you can download the certificate from App Store Connect only once for each Key ID

  • Thanks for the reply. Indeed I checked and the Key ID matches the name of the p8 file. And it was created this week so it cannot have expired. I guess my only option is go through the process again and create a new one. – Nearchos Jan 06 '21 at 14:22