SSL certificate rejected trying to access GitHub over HTTPS behind firewall
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
When GitHub access fails over HTTPS behind a corporate firewall, the problem is often not GitHub's certificate at all. The usual cause is TLS interception by a proxy or firewall that substitutes its own certificate chain, which your machine does not trust.
That is why the same URL works on a home network and fails inside the office. The connection path changed, and so did the certificate chain presented to the client.
What Is Usually Happening
Many enterprise firewalls inspect outbound HTTPS. To do that, they terminate the TLS session, inspect the traffic, and create a new certificate for the destination on the fly. Your browser, Git client, or package manager will trust that only if the corporate root certificate is installed in the local trust store.
Typical symptoms include:
- certificate signed by unknown authority
- self-signed certificate in certificate chain
- unable to get local issuer certificate
- SSL certificate problem when running
git cloneorgit fetch
The fix is almost always "trust the correct corporate root" rather than "disable SSL verification."
How To Inspect the Presented Certificate
Use openssl to see what certificate chain you are actually getting on the affected network:
If the issuer looks like an internal security appliance instead of a public CA, TLS inspection is happening.
You can also inspect what Git itself is seeing:
That often reveals whether the failure comes from certificate trust, proxy configuration, or a blocked outbound connection.
Fixing It Correctly
The correct fix depends on whether the environment is managed.
Corporate Machine
Ask the IT or security team for the root CA certificate used by the firewall or proxy. It should be installed into the operating system trust store or the Git trust store, depending on how Git is configured.
Git Using a Custom CA File
If Git is not using the system store, point it at the enterprise root certificate:
If a proxy is required, configure that explicitly too:
Windows Environments
Git for Windows may use either the Windows certificate store or its own CA bundle depending on configuration. Check:
Using schannel lets Git rely on the Windows trust store, which is often the cleanest option on managed desktops.
What Not To Do
Do not "solve" this with:
That disables server identity verification and defeats the point of HTTPS. It may get a clone working temporarily, but it also makes the client vulnerable to real interception.
If you are in a corporate environment, security teams usually have an approved trust-chain procedure. Use it.
Additional Checks
If certificate trust still looks correct, inspect the basics:
- system clock is accurate
- proxy settings are correct
- GitHub is allowed on port
443 - no stale custom CA bundle is overriding the system store
A wrong system date alone can make a valid certificate look expired or not yet valid.
Common Pitfalls
- Blaming GitHub when the actual certificate is being replaced by a firewall.
- Disabling SSL verification instead of fixing the trust chain.
- Importing the proxy certificate into the browser only, while Git uses a different trust store.
- Forgetting to configure the required HTTP or HTTPS proxy.
- Ignoring the system clock and CA bundle age during troubleshooting.
Summary
- SSL rejection behind a firewall is often caused by corporate TLS inspection.
- Use
openssl s_clientand Git verbose output to inspect the presented chain. - Trust the correct corporate root CA instead of disabling verification.
- On Windows,
schanneloften makes Git use the system trust store cleanly. - Treat
http.sslVerify falseas a last-resort debugging step, not a real fix.
Related reading
- Static hosting on Amazon S3 - DNS Configuration
- Static IP using Elastic Beanstalk
- Static outbound IP for AWS ECS Fargate task
- Static outgoing IP in Kubernetes
- SSL CERTIFICATE_VERIFY_FAILED in aws cli
- SSL certificates from Let’s Encrypt in your Kubernetes Ingress via cert-manager
- Stage file by its file name, regardless of directory--Git
- Standard way to embed version into Python package?

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.