





While working with or using Git Bash, at some point, you might have encountered an “SSL Certificate Problem: Unable to get Local Issuer Certificate.” Facing an ” Unable to get Local Issuer Certificate” error can be frustrating as it doesn’t go away no matter how many times you verify your URL or modify your cURL request.
So, the question that arises here is – “Are there any ways or methods that we can utilize to resolve or fix this error?
The answer to this query is – “Yes.” There are a few methods that you can attempt to resolve the Unable to get Local Issuer Certificate Issue. But before we discuss those methods, it would be better to understand what precisely the SSL Certificate Problem: Unable to get Local Issuer Certificate error is and what causes it.
The SSL Certificate Problem: Unable to get Local Issuer Certificate error is a common issue that developers often encounter while using Git Bash, a Windows command line tool to push, pull, or clone a Git repository.
The “Unable to Get Local Issuer Certificate” error stems from a misconfigured SSL certificate on your local machine. This misconfiguration prevents a successful HTTPS handshake from taking place.
The error is often linked to self-signed or corporate certificates, particularly with Git. (Self-signed certificates are mainly used in testing or development environments and are not verified by trusted Certificate Authorities. Git may throw an error when encountering such certificates.
Corporate organizations often have their own Certificate Authorities, but these certificates may not be trusted by external services like Git, leading to the same error.) Visual Studio Code users may encounter it due to a misconfigured certificate path on their machine.
To fix the SSL/TLS error – “SSL Certificate Problem: Unable to get Local Issuer Certificate,” you can perform any one of the methods mentioned below.
Despite not using Git Bash, if you are facing the Unable to Get Local Issuer Certificate error, use this method to resolve it.
Follow the steps mentioned below to alter the php.ini file:
Note: Enter the code mentioned below to resolve the issue without modifying the php.ini file.
$ch = curl_init();
$certificate_location = ‘/usr/local/openssl-0.9.8/certs/cacert.pem’;
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $certificate_location);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $certificate_location);
If you are a Git Bash user facing the Unable to Get Local Issuer Certificate error, use this method to resolve it. Follow the steps mentioned below to add an SSL cert to the Trusted Certificate Store:
If facing trouble in running Git commands like – git pull, push, or clone, reinstall Git and select the SSL Transport Backend option. Follow the steps mentioned below to accomplish the same:
If the Unable to get Local Issuer Certificate error occurs inside VSC, perform the below-mentioned steps to resolve it:
Disabling SSL verification is not recommended for security. Once the SSL cert is disabled, malicious actors can attack the system and access data, leading to breaches and ransomware attacks.
Follow the steps mentioned below to disable the verification of your SSL certificate:
Note: To re-enable SSL certificate verification, use the $ git config –global http.sslVerify true command.
If you encounter the “SSL Certificate Problem: Unable to get Local Issuer Certificate” error, you can try the following methods one by one until the issue gets resolved/fixed: