"keytool error: java.lang.Exception: Input not an X.509 certificate"
"Input not an X.509 certificate" when trying to import my Sun Java™ certificate into the keystore.
Error occurs when importing Sun Java™ certificate into the keystore.
This error occurs when one of the following conditions are true:
To resolve this issue:
Note: Where alias_name, is the alias of the private key in your keystore, keystore_name is the path to your keystore and keystore_output.txt the file that will be created.
You will be prompted to enter the keystore password.
Important: If you have forgotten your alias or need to verify your keystore details, refer to SO28992