gitsslazure-devopsssl-certificatezscaler

How to import a zscaler certificate into Git


While trying to check-in/checkout code on Azure DevOps, I got the following error with Git:

SSL certificate Error

$ git clone https://...
Cloning into '...'
fatal: unable to access 'https://...
...: SSL certificate problem: unable to get local issuer certificate

The application has to send the traffic to Zscaler proxies. For this we have un-set the proxy in Git. That application is able to connect the URL but the SSL handshake was not happening. Git is not aware of Zscaler certificate due to which it could not establish SSL handshake with destination server.

I need to find a way to import Zscaler certificates in Git so that it can connect to the destination.

Is it possible to just copy paste the certificates into the Git folder? What are the certificate under git\usr\ssl\certs?


Solution

  • Was able to bypass this issue with the command, however poses a security risk

    git config --global http.sslVerify false

    To trust a certificate, you can try these steps and check the result:

    1. Export the certificate through browser (e.g. chrome): Click lock icon in address bar > Certificate > Certification Path > Select top-most certificate in the chain > View Certificate > Copy to file (Choose Base-64 encoded X.509).
    2. Copy content to ca-bundle.crt file (check http.sslcainfo value by calling git config –l command) More information: Adding a corporate (or self-signed) certificate authority to git.exe’s store

    More information: Adding a corporate (or self-signed) certificate authority to git.exe’s store