Problem
When developing inside organization, the is chance that the internal firewall will generate its self certificates (untrusted by general programming language or tools like java and git) replacing the original certificate (trusted and issue by known issuer for internet) for internal proxied http traffic.
The behavior is normally like you have no trouble on accessing the https://dev.azure.com from the browser. But when access from dev tools like git, you would receive message like SSL certificate problem: unable to get local issuer certificate like below.

How to solve
For git there are two way to handle the issue and get the repo downloaded.
1. Bypass the ssl verification
Bypassing the verification process is the fastest way to solve, by leaving the chance of getting MITM attack (man in the middle attack) because the certificate is not verified.
one off command
By adding one off command argument to the git clone, the ssl certificate verification is bypassed.
|
|
permenent solve
Adding the configuration to .gitconfig file (could be placed under home directory)
|
|
And then clone with command.
|
|
1. Extract SSL certificate
Extracting the ssl certificate is a little bit complex comparing to directly bypassing. We first extract the SSL certificate through openssl save the certificate. When git operation process, it use the downloaded certificate for verification. When someone else perform MITM attack, the certificate will guard the traffic from attack.
Extract SSL Certificate
|
|
one off command
|
|
permenent solve
|
|
And then clone with command.
|
|