Fixing Git Portable SSL Certificate Errors on Windows
Git Portable on Windows and how you resolved it.
Fixing Git Portable SSL Certificate Errors on Windows: CRYPT_E_NO_REVOCATION_CHECK
Introduction
While cloning a Git repository on Windows using Git Portable, I encountered the following SSL error:
text
schannel: next InitializeSecurityContext failed:
CRYPT_E_NO_REVOCATION_CHECK (0x80092012)
- The revocation function was unable to check revocation for the certificate.
This error prevented Git from establishing a secure HTTPS connection to the remote repository.
In this post, I'll explain what caused the issue, how I configured Git Portable to use the Windows certificate store, and the steps that resolved the problem.
Understanding the error
Git for Windows can use different SSL/TLS backends to establish secure connections. One of them is Schannel, which uses Windows' native security infrastructure.
The error CRYPT_E_NO_REVOCATION_CHECK indicates that Windows could not complete the certificate revocation check. Revocation checking helps determine whether a certificate has been invalidated by its issuing certificate authority.
This can happen in environments such as:
Corporate networks with HTTPS inspection.
Networks that restrict access to certificate revocation endpoints.
Systems using custom corporate certificate authorities.
Portable Git installations with a different SSL configuration than expected.
Importing a certificate into Windows may establish trust in the issuing authority, but certificate trust and revocation checking are separate concerns.
Step 1: Import the certificate into Windows
My environment required a certificate provided for the network or corporate environment.
After obtaining the certificate from a trusted source, I imported it into the appropriate Windows certificate store.
For a trusted root CA certificate, the relevant store is generally:
Trusted Root Certification Authorities → Certificates
For a corporate-managed machine, follow your organization's certificate installation policy and ask your IT team if administrator permissions are required.
Step 2: Inspect Git Portable's configuration
I was using Git Portable from the following directory:
text
D:\DO_NOT_DELETE\Portables\PortableGit
To inspect the configuration and identify which files Git was reading, I ran:
cmd
git config --list --show-origin
The output showed that Git Portable was loading its system configuration from:
text
D:/DO_NOT_DELETE/Portables/PortableGit/etc/gitconfig
It also showed a user-level configuration file:
text
C:/Users/Administrator/.gitconfig
The user-level configuration contained an explicit CA certificate path:
text
http.sslcainfo=D:\DO_NOT_DELETE\CA_CERTIFICATE\certificate.crt
Next, I checked whether an SSL backend was explicitly configured:
cmd
git config --show-origin --get http.sslBackend
The command returned no value, meaning that no explicit http.sslBackend setting was present in the configuration.
Step 3: Configure Git to use Schannel
Since the certificate had already been imported into Windows, I configured Git to use Schannel.
Run the following command:
cmd
git config --global http.sslBackend schannel
This tells Git to use the Windows native SSL/TLS backend, which can use certificates trusted by Windows.
Why configure Schannel?
Using Schannel can simplify certificate management in Windows environments because certificates can be managed centrally through the Windows certificate stores rather than through a separate CA bundle maintained by Git.
This is particularly useful for Git Portable installations operating on corporate networks with organization-managed certificates.
Step 4: Remove the explicit CA certificate override
My Git configuration also contained an explicit http.sslCAInfo setting.
Because I was switching to Schannel and wanted Git to use the Windows certificate store, I removed that override:
cmd
git config --global --unset http.sslCAInfo
This command removes the configuration entry; it does not delete the certificate imported into Windows.
Important: This step is appropriate when you intend to use Schannel and the Windows certificate store. If you use OpenSSL instead, configuring a CA bundle may be the appropriate approach.
Step 5: Verify the configuration
To confirm that the backend was configured correctly, I ran:
cmd
git config --show-origin --get http.sslBackend
The output showed the configured value:
text
file:C:/Users/Administrator/.gitconfig schannel
This confirmed that Git was configured to use Schannel through the user-level Git configuration.
Step 6: Retry cloning the repository
Finally, I retried the Git clone command:
cmd
git clone <repository-url>
The clone operation completed successfully after the configuration changes.
Troubleshooting notes
If you encounter the same error, keep these points in mind:
Certificate trust and revocation checking are different. Importing a CA certificate may resolve trust problems, but it will not necessarily fix an inaccessible CRL or OCSP endpoint.
Check the SSL backend. Git for Windows can use Schannel or OpenSSL, and the appropriate certificate configuration depends on which backend is active.
Inspect the configuration source. Use git config --list --show-origin to determine whether a setting comes from the system, user, or repository configuration.
Check corporate network restrictions. If revocation checks still fail, investigate proxy, firewall, VPN, and certificate revocation endpoint connectivity.
Avoid disabling security checks unnecessarily. Disabling certificate revocation checking can reduce security and should not be the first choice when a proper certificate or network fix is available.
Conclusion
The issue was resolved by configuring Git Portable to use Schannel and removing the explicit CA certificate file override so that Git could use the Windows certificate store.
The key commands were:
cmd
git config --global http.sslBackend schannel
git config --global --unset http.sslCAInfo
git config --show-origin --get http.sslBackend
This approach can be useful when working with Git Portable on Windows, especially in environments where certificates are managed through Windows.
Takeaway: Before disabling SSL security checks, inspect Git's configuration, identify the active SSL backend, and ensure that the certificate and revocation-checking infrastructure are configured correctly.
Suggested blog title alternatives
How to Fix CRYPT_E_NO_REVOCATION_CHECK in Git Portable on Windows
Git Clone SSL Errors on Windows: Configuring Schannel and CA Certificates
Fixing Git Portable Certificate Issues in Corporate Environments
Suggested tags: Git, Git Portable, Windows, SSL, Schannel, Certificates, Troubleshooting
Comments
Post a Comment