KeyTool错误:java.lang.Exception:别名不存在 [英] KeyTool error : java.lang.Exception : Alias does not exist

查看:1327
本文介绍了KeyTool错误:java.lang.Exception:别名不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过以下命令成功导入了证书:

I have sucessfully imported the certificate by below command:

keytool -import -alias "alias-name" -file 
  "C:\somepath\Certificate\portal.cer 
  -keystore C:\Program Files\Java\jdk1.7.0_79\jre\lib\cacerts"

现在我正尝试使用

keytool -delete -alias "alias-name" -keystore 
     "C:\Program Files\Java\jdk1.7.0_79\jre\lib\cacerts" -storepass changeit

但是我结束了以下错误消息:

But I am end with the below error message:

KeyTool错误:java.lang.Exception:别名不存在

KeyTool error : java.lang.Exception : Alias does not exist

推荐答案

检查别名是否存在.您可以使用以下方式列出所有条目:

Check if the alias exists. You can list all entries using:

keytool -list -keystore "C:\Program Files\Java\jdk1.7.0_79\jre\lib\cacerts" -storepass changeit

此命令将显示文件中所有现有的别名.如果不存在,这就是为什么您无法删除它的原因.

This command will show all existing aliases in the file. If it's not there, that's why you can't delete it.

这篇关于KeyTool错误:java.lang.Exception:别名不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆