Keytool error: java.lang.Exception: Public keys in reply and keystore don't match

Hi @JeremyColton

A JKS cannot exist without a key and a certificate in it.

You are importing a certificate to an existing key.

You need to convert your key and cert to a PFX and then import that.

A lot of theory here: Tutorial - Java KeyStores (JKS) With Let's Encrypt

How to do the PFX: Certbot and Tomcat - Certificates Obtained but Not Converted to JKS and Configured with Tomcat (FIXED!)

Andrei

1 Like