When working with Git over HTTPS, TLS configuration errors can stall deployment pipelines, block CI/CD runs, and frustrate rapid releases. The fix often starts with understanding how Git uses TLS and how to reset its configuration without breaking trust chains.
Why TLS configuration matters in Git
Git relies on your system's SSL/TLS stack to verify remote connections. Misconfigured certificates, outdated CA bundles, or local overrides can cause handshakes to fail. Engineers encounter this when switching between networks, cloning from hosts with internal CAs, or after system-level SSL upgrades.
How to reset Git TLS configuration
- Check your current TLS settings
git config --list --show-origin | grep http.ssl
This reveals whether SSL verification is overridden locally or globally.
- Reset overrides to default
To restore Git's TLS handling to the system default:
git config --global --unset http.sslVerify
git config --system --unset http.sslVerify
Avoid disabling verification entirely unless diagnosing a short-lived issue.
- Update your CA certificates
On Linux:
sudo update-ca-certificates
On macOS with Homebrew:
brew install ca-certificates
Then re-run git pull or git fetch to ensure the handshake passes.
- Verify with verbose output
GIT_CURL_VERBOSE=1 git ls-remote https://example.com/repo.git
This exposes curl/TLS negotiation details for debugging.
Persistent errors and corporate environments
If the issue persists, your Git client may need explicit certificate paths:
git config --global http.sslCAInfo /path/to/cacert.pem
This is common in enterprise networks that use self-signed or internal CA certificates. Always confirm the integrity and trust level of any provided certificate before adding it.
Best practices after resetting TLS
- Keep system and Git updated.
- Use
--global edits for developer environments, --system for build servers. - Never store insecure TLS settings in project repos.
A clean, correctly configured TLS setup ensures Git reads from and writes to remotes without delays or security gaps. Resetting TLS configuration in Git is not just a fix—it’s part of disciplined version control hygiene.
See how streamlined Git integrations with secure defaults work at hoop.dev and get it running in your stack in minutes.