Import Certificate into the Trust-store

DeepakBhatia
Contributor
November 27, 2011

Hi,

I am executing the command below in the JIRA User Guide

But I get the following error

Regards

Deepak Bhatia

[root@localhost ~]# keytool -import -alias tomcat -file file.cer
Enter keystore password:
keytool error: java.lang.Exception: Certificate reply and certificate in keystore are identical

3 answers

1 accepted

8 votes
Answer accepted
Sandro Herrmann [Communardo]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 27, 2011

your command only trys to import the cert to your local keytore (on windows User/USERNAME/.keystore). In this keystore the tomcat file is already existing.

You Should add the certificate to your JIRA's JRE.

keytool -import -file tomcat.cer -alias tomcat -keystore "%JAVA_HOME%\lib\security\cacerts"

But Attention, if your are using a JDK for your JIRA (i think you ever need a jdk to run JIRA) you have to use the "jre" folder in your JDK

keytool -import -file tomcat.cer -alias tomcat -keystore "PATH_TO_JDK\jre\lib\security\cacerts"

If you want do change the certificate in your local keystore you have to remove the old one proviously

keytool -delete -alias tomcat

Don't forgot to restart your JIRA after changes :)

asadullah rahmani July 6, 2014

how can restart JIRA ,whitch command must be run to restart JIRA

Maitrey Patel July 25, 2017

To restart JIRA try following:

C:\Program Files\Atlassian\JIRA\bin>stop-jira.bat

C:\Program Files\Atlassian\JIRA\bin>start-jira.bat

Change your path accordingly.

0 votes
Adolfo Ortiz June 3, 2020

Hi.

Is it necessary set JAVA_HOME? In my Jira's installation isn't

Regards

0 votes
Mhlaba
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 6, 2017

Hi,

I am mhlaba can anyone please assist as we trying to re-new a certificate for JIRA. we have already received the certificate but we trying to install it on JIRA but the is no luck.

can anyone assist?

anieissac
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2017

hi...did this work..i,m trying to import .pfx file. it doesnt work..any luck?

Suggest an answer

Log in or Sign up to answer