1. start with getting server certificates
run: openssl s_client -showcerts -connect
2. srom the result copy parts from -----BEGIN CERTIFICATE----- to -----END CERTIFICATE----- (included) and paste it to text file (pem).
3. now add those certs to your java keychain
run: keytool -keystore $JAVA_HOME/bin/lib/security/cacerts -import -file [file_name]
And there you go!