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


Error 

Command to import the certificate into the Java keystore fails with the following error:

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

Cause 

Alias already exist. Needs to removed previous alias before adding a new one. 

Resolution 

Make sure that you don't require the previous import with the same alias. If required , Do this import with new alias. If not, proceed with the following command. 

Delete the certificate with the alias using the following command 

keytool -delete -alias <Key> -keystore <../.../... /lib/security/cacerts> -storepass changeit . 

Then run the import command.


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM