我在本地机器上生成证书时出现以下错误。
C:\Users\abc>keytool -genkey -alias tomcat -keyalg RSA
Enter keystore password:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
我认为jdk版本有一些问题。我在我同事的机器上运行了同样的命令,它工作得很好。
请分享你的意见。
我在本地机器上生成证书时出现以下错误。
C:\Users\abc>keytool -genkey -alias tomcat -keyalg RSA
Enter keystore password:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
我认为jdk版本有一些问题。我在我同事的机器上运行了同样的命令,它工作得很好。
请分享你的意见。
当前回答
我通过使用cacerts keystore的默认密码来解决这个问题:'changeit'
其他回答
你有两个选择:
CMD在输入时不会在屏幕上显示密码 所以只要输入正确的密码——小心点——然后按回车。
或 只使用:
keytool -list -keystore 'keystoreName' -storepass 'type your keystore passwd'
对于Keys的完整信息,添加-v:
keytool -v -list -keystore 'keystoreName' -storepass 'type your keystore passwd'
在我的Mac上,空密码是可行的
keytool -list -v -keystore ~/.android/debug.keystore
按回车键,就会显示出来
Enter keystore password:
在这里,只要按Enter键就可以获得空密码
在我的情况下,我需要有根访问权限。
对我来说,我通过将密码从阿拉伯字母改为英语字母来解决这个问题,但首先我去文件夹并删除生成的密钥,然后它就工作了。
我已经解决这个问题,使用默认密码“changeit”。