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.
📋 Table of Contents
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
- 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
- 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.
❓ Frequently Asked Questions
🛠️ Related Fixes
How to Fix: Pc crashes shortly after launching game (rainbow
Pc crashes shortly after launching game, possible cause: outdated grap
How to Fix: Installing an APK on a locked down phone
Installing an APK on a locked down phone: Try using a rooted device, e
How to Fix: FPS drops
FPS drops in games can be caused by high system resource usage, outdat