Cannot export private key from System.keychain with Keychain Access or command line
Most likely, your key was imported with -x option for security import:


&lt;...&gt;
-x      Specify that private keys are non-extractable after being imported.
&lt;...&gt;



When you try to export a key, Security Framework checks whether this attribute is set and refuses to export the key.

Of course, the key is still there and you might be able to find a way to extract it (see this question).