Header Shadow Image


keytool error: java.lang.Exception: Certificate not imported, alias already exists

What if this is seen:

# keytool -importcert -keystore /path/to/my.keystore -storepass CorrectPass -trustcacerts -file ca.crt -noprompt -alias MyAlias
keytool error: java.lang.Exception: Certificate not imported, alias <MyAlias> already exists
#

Then you may do this to remove the CERT if you plan to redo it.

# keytool -delete -keystore /path/to/my.keystore -storepass CorrectPass -alias rhq-ca
#

Followed by this to see it gone:

# keytool –list -keystore /path/to/my.keystore -storepass CorrectPass

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 0 entries

#

Cheers,
TK

Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

     
  Copyright © 2003 - 2025 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License

 

0
Would love your thoughts, please comment.x
()
x
The IT Development and Technology Mini Vault | MicroDevSys.com
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.