Skip to content

Instantly share code, notes, and snippets.

@ansulev
Created August 15, 2018 10:22
Show Gist options
  • Save ansulev/a4f2e4d23071a938122dbf21dcec8b9e to your computer and use it in GitHub Desktop.
Save ansulev/a4f2e4d23071a938122dbf21dcec8b9e to your computer and use it in GitHub Desktop.
Convert .CRT y .KEY Certificates to JKS Keystore
# Convert it into pkcs12 format
openssl pkcs12 -export -out jenkins.p12 -inkey certificate.key -in certificate.crt -name "jenkins-cert"
# Create keystore if not exist
https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html
# Import
keytool -importkeystore -srckeystore jenkins.p12 -srcstoretype pkcs12 -destkeystore keystore.jks
@DSMan97
Copy link

DSMan97 commented Jan 16, 2022

Perfect that the script I was looking for. Just for my Jenkins. Thanks in advanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment