Fighting with Apple dev certificates...

After reinstalling Sierra to escape dismal High Sierra, I needed to reinstall my developer certificates. As usual, easier said than done.

In XCode Preferences Manage Certificates, I was able to reinstall Mac App Distribution and Mac Installer Distribution, so I can sign for the MAS.

But Developer ID Application as well as Developer ID Installer show as Missing Private Key. XCode refuses obstinately to install either, popping up :
“You already have a current Developer ID Application Certificate or a pending certificate request”.

I tried to delete the certificates from keychain, no luck. Maybe I did not find them.

I tried to download the certificates from https://developer.apple.com/account/mac/certificate/ but the key does not install.

Help !

I would make a project in Xcode, build a project with signing and let Xcode do the certificate download.