Firstly download the certificate into any of your directory, for me I choose (D:\My) where I kept my certificate with the name xyz.cert.
Second, you should be the admin of CMD/Command and write the word "keytool", it should give you the output as :
Key and Certificate Management Tool
Commands:
-certreq Generates a certificate request
-changealias Changes an entry's alias
-delete Deletes an entry
...something like this should be the output
Third, As all the certificate are kept "cacerts" which is in the directory -
C:\Program Files\Java\jdk1.8.0_172\jre\lib\security
Use the below command from the directory -
C:\Program Files\Java\jdk1.8.0_172\jre\lib\security
keytool -import -alias clojars.org -keystore /cacerts -file
D:/My/xyz.cer
Where to find what :
- When you double click on the certificate (xyz.cert in my case) it
will open a pop up, where you will find in General Tab, Issued to
:
clojars.org ( this name you need to give in front of -alias)
- In front of -keystore should be the path of cacerts but as we are
already in the directory
C:\Program Files\Java\jdk1.8.0_172\jre\lib\security, so we can just give
/cacerts
- file --> location of the certificate
If it asks for password, default is changeit, so keep the same everytime
Hope this solves your problem. :)