I was having a problem with codesigning my apps, so I deleted all the keys from the keychain. Then I went to Certificate Assistant => Request a certificate from a Certif
This was happening to me I noticed that the menu option for creating the certificate request had changed from
Request a Certificate from a Certificate Authority...
to
Request a Certificate from a Certificate Authority with "My Name"...
I'm on a domain at work so I logged out, logged in and out as another user, then logged in again. After that the menu appeared as expected and this error went away
You are (perhaps accidentally) asking Keychain Access to generate a Certificate Signing Request using an existing key. If a key is selected when you go into the Keychain Access - Certificate Assistant menu, the options presented will be for that selected key.
Choose a non-key item in your keychain (like a saved password) and go to Keychain Access - Certificate Assistant again to generate the CSR normally.
For me the problem are one certificate that was messed up.
Identifying the bad certificate: