I got this computer in July. I had another computer before this and I successfully exported the signing certificate and it's private key and added them to this computer. Everything has been working fine. I successfully pushed 2 apps to AppStoreConnect last week.
On Monday I had a weird error (different from this question) and Revoked a certificate by mistake. Ever since then I keep getting the error:
Your account already has a signing certificate for this machine but it is not present in your keychain
When I go to Xcode
> Accounts
> Apple IDs
> Team
and click the plus sign
it says
Not in Keychain // 2nd pic
At first when I tried to pull the missing Distribution Certificate into Keychain
> login
I kept getting this:
When I try it on the command line I get Segmentation fault: 11
:
$ security import /Users/Home/Desktop/Certificates_Folder/my@email/Certificate.p12 -k ~/Library/Keychains/login.keychain
$ Segmentation fault: 11
Oddly it let me send every other certificate to login
except that distribution one.
So instead I created a new keychain item named Brand_New_Keychain
and added both the certificates in there. When I check in Brand_New_Keychain
both certificates are present and they are both in System
.
I unchecked Automatic
, deleted the developer team using the minus sign then added it back, I closed Xcode, restarted the computer, opened Xcode, etc same problem persists.
As detailed in the photos below the Not in Keychain certificates are in Keychain Access. What is the problem here?
1- Signing Error
2- Not in Keychain Message
3- Expiration Date from the Development Certificate
4- Expiration Date from the Distribution Certificate
5- The new Keychain item I created Brand_New_Keychain
> Certificates
> both certificates with the same expiration dates from pics 3 & 4 that it's saying I don't have in Keychain
6- When I pushed one of my apps up to AppStoreConnect it said I didn't have a .p12
file for the app and created one for me. I downloaded it. This and it's private key
is present in Brand_New_Keychain
> My Certificates
> the same expiration date as the missing Distribution Certificate
from the 4th pic. The development certificate from the 3rd pic isn't here because I created it using the Revoke Certificate button from the 3rd pic. Afterwards I went to Apple and downloaded it but it never gave me a private key.
7- System > Certificates > both certificates with the same expiration dates from pics 3 & 4 that it's saying I don't have in Keychain
8- developer.apple.com
> Certificates
> both certificates with the same expiration dates from pics 3 & 4 that it's saying I don't have in Keychain. I downloaded both of these and the other 2, then clicked them all, dragged them into keychain, and even used security import /Users/Home/Downloads/Certificate.p12 -k ~/Library/Keychains/login.keychain
to get each one in
I went back to the old computer and successfully exported the original
.p12
then imported in into Keychain so it's definitely there with it's private key.Every certificate with a private key I changed the Access Control to
Allow all ...
:
Update:
@matt suggested I create a new login in Keychain Access which I did. The same errors are still present however the 2nd pic when I go to Xcode
> Accounts
> Apple IDs
> Team
and click the plus sign
has changed. Now it says: