When you are using a self-signed certificate for your codeBeamer Instance (codeBeamer comes with such a certificate by default) you need to add this certificate to the Keystore of the Java installation on the server where Jenkins is installed.
In order to add the certificate you have to perform two steps:
- Download the Certificate:
echo -n |openssl s_client -connect `codeBeamerHostName`:`Port` -showcerts | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > codebeamer.cert
Replace `codeBeamerHostName` and `Port` with the hostname and port of your codeBeamer instance (e.g. codebeamer.com and 443)
- Install the Certificate:
keytool -import -file codebeamer.cert -keystore /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts -alias codeBeamer
You will be prompted to enter the password for the keystore, the default password is 'changeit
'.
It is important to specify the correct keystore. You can check with:
keytool -v -list -keystore /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts
This should print out a long list of certificates your Java installation already trusts. The command above works for OpenJDK 8 on Ubuntu 16.04., but the path will depend on your Operating System and Java Runtime. After you added the self-signed certificate you may need to restart Jenkins.
To check whether the certificate was installed correctly run the command above and grep for the alias:
keytool -v -list -keystore /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts | grep -A13 codeBeamer