gitmavengradlecertificatezscaler

Using Git, Gradle and Maven with ZScaler Certificate?


we're now using ZScaler instead of a proxy to check the internet traffic. It's quite an improvement, however setting up Git, Gradle and Maven with a proxy was easier to set up than setting it up with ZScaler. For using ZScaler we received a .cert-file which starts with "-----BEGIN CERTIFICATE-----" and ends with ""-----END CERTIFICATE-----". Between those lines is some hash code.

So my question is: How can I setup
a) Git
b) Gradle
c) Maven
in their respective "global settings" (so not for each project) with this certificate such that
a) pulling and pushing
b) / c) resolving dependencies
works again.

Thanks in advance.


Solution

  • For Git, append this to your .gitconfig file

    [http]
    proxy = http://gateway.zscaler.net:80/
    sslCAInfo = /path/to/your/zscaler-root-ca.crt
    

    I believe any file extension for the cert file will be accepted, as long as it's not the binary encoded format. openssl can be used to convert back and forth.

    For Maven and Gradle and others (CURL, NPM, Yarn) the idea is the same, add the zscaler certificate to the certificate store. Some will need to append to a certificate bundle file. Apologies for an incomplete answer, I'm working through this myself. Wish zscaler provided more documentation on this.