PTCInc / thingworx-gitbackup-extension

[Unofficial/Not supported] ThingWorx GitBackup Extension for storing your ThingWorx application code in a Git repository
MIT License
25 stars 11 forks source link

GitBackup.Main.Mashup gives SSL handshake errors #27

Closed claesaronsson closed 2 years ago

claesaronsson commented 2 years ago

I am using GitBackup.Main.Mashup v4.1 on ThingWorx 9.2 on Linux. Trying to pull code from our GIT repository I get errors on Secure connection could not be established because of SSL problems unable to find valid certification path to requested target

I assume that it's missing the certification path(root and intermediate cert) to our GIT server.

Tested to use the native git command on Linux command line I initially got same error massage until config was updated with: git config --global http.sslCAInfo After updating config that worked

How, to update config for the GitBackup.Main.Mashup to include SSL certificate chain?

cbadici commented 2 years ago

Hi, I haven't encountered issues with the SSL Handshake when using the git extension. However, this is not related to the Mashup or the extension, but it is a typical error related to connecting to a third-party system that has a certificate ThingWorx doesn't trust. For this, you probably need to add the git server's certificate to the truststore used by ThingWorx, which is the cacerts file from the Java installation (the same Java used by ThingWorx). This file is usually located in JAVA_HOME\jre\lib\security\cacerts and you can use keytool to import the certificate into the trust store. A command would look something like this: keytool -importcert -file Yourcertificate.cer -alias Yourcertificatealias -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit After this, you will need to restart ThingWorx

claesaronsson commented 2 years ago

I missed the restart... after restart it works!