Link to home
Create AccountLog in
Avatar of shepp_it
shepp_it

asked on

Java Keytool Keystore Password Reset

Hi, I'm trying to generate a self-signing key using Java Keytool but I'm getting following error:

C:\Users\spark>keytool -genkey -keyalg rsa -alias tstkey
Enter keystore password:  abc123
keytool error: java.io.IOException: Keystore was tampered with, or password was
incorrect

I previously created a keystore password, but I can't remember what it was. I deleted my JRE and JDK and reinstalled but I had no luck. Is there a way to reset the password? Where is the keystore file located?
Avatar of Mick Barry
Mick Barry
Flag of Australia image

you need to create a new keystore
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of shepp_it
shepp_it

ASKER

Hi I'm getting following error when I used the example from above link you provided:

C:\Program Files\Java\jdk1.6.0_19\bin>keytool -keystore myKeystore -keypasswd se
cret -genkey -keyalg RSA -alias mycert
keytool error: java.lang.RuntimeException: Usage error, secret is not a legal co
mmand
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thank you. Can you also tell me how to delete the certificate and keystore I created?
Just delete the directory from the filesystem
Ok Thanks
:)