Software⏱️ 2 min read📅 2026-05-30

How to Fix: Unable to resolve "unable to get local issuer certificate" using git on Windows with self-signed certificate

Git on Windows with self-signed certificate issue resolved by adding the certificate to the Git Bash cache.

Quick Answer: Add the self-signed certificate to the Git Bash cache to resolve the 'unable to get local issuer certificate' error.

The error 'unable to get local issuer certificate' when using HTTPS with Git on Windows can be frustrating, especially when you have verified that the self-signed certificate is installed correctly in the Trusted Root Certification Authorities. In this article, we will explore the root causes of this issue and provide step-by-step fixes to resolve it.

🛑 Root Causes of the Error

  • Git on Windows does not automatically trust self-signed certificates by default. This is a security feature to prevent man-in-the-middle attacks.

🛠️ Step-by-Step Verified Fixes

Method 1: Add the Certificate to Git's Trusted Certificates

  1. Step 1: Open the Command Prompt or PowerShell on your Windows machine and run the command `git config --global http.sslCAInfo `. Replace `` with the actual path to your self-signed certificate file.

Method 2: Add the Certificate to Git's Trusted Certificates using the .gitconfig File

  1. Step 1: Open your Git repository's `.git/config` file in a text editor. You can do this by running the command `git config --local http.sslCAInfo ` and then opening the resulting file.

🎯 Final Words

By following these steps, you should be able to resolve the 'unable to get local issuer certificate' error when using HTTPS with Git on Windows. Remember to always verify that your self-signed certificates are installed correctly in the Trusted Root Certification Authorities to avoid this issue.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions