Fix SSL certificate problem: unable to get local issuer certificate

Operating system: Mac OSX Big Sur 11.2

When you encountered this error SSL certificate problem: unable to get local issuer certificate means that local git command cannot verify SSL validity.

For my scenario, I blocked all ocsp.* related domain to prevent personal privacy leaks to FAANG cooperation or provider.

Cause

This error occurs when a self-signed certificate cannot be verified. 

Workaround

Tell git to not perform the validation of the certificate using the global option:

git config --global http.sslVerify false

(warning) Please be advised disabling SSL verification globally might be considered a security risk and should be implemented only temporarily

Photo by Markus Winkler on Unsplash