I'd like to use the Jira CLI to export a list of issues, but I have trouble connecting to the server. My company issues certificates we have to use when logging on to the web interface of jira, so I exported this certificate, with the private key, using certmgr.msc. I then moved to linux, and imported this certificate into a new keystore file, as follows:
keytool -importkeystore -srckeystore cert.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS
Next, I obtained the public key of the server, by clicking on the padlock in the address bar of Firefox, navigating to "Export...", and then imported the server certificate into a new truststore, as follows:
keytool -import -keystore servercert.jks -file server.crt
Finally, I try using the Jira CLI from the linux commad line as follows:
java -Djavax.net.ssl.trustStore=servercert.jks -Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.keyStore=clientcert.jks -Djavax.net.ssl.keyStorePassword=changeit -jar ./lib/jira-cli-3.9.0-SNAPSHOT.jar --server https://server --user username --password password --action getIssueList --filter 10000 --file output.txt
This results in the following error message:
Unable to log in to server: https://server/rpc/soap/jirasoapservice-v2 with user: username.
Cause: ; nested exception is:
java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
Any ideas as to what I'm doing wrong?