The clone failed at 97%. The error said fatal: unable to access 'https://...': SSL certificate problem: unable to get local issuer certificate. Everyone stared at the screen. No code was wrong. The problem was Git’s TLS configuration.
Git checkout with TLS misconfigured is friction you can’t ignore. It breaks pipelines, blocks CI/CD, and halts deploys. Whether you’re fetching a private repo, cloning over HTTPS, or switching branches in a zero-downtime build, TLS is the gatekeeper. If the keys don’t match, nothing moves.
TLS configuration in Git is often invisible—until it isn’t. The handshake between Git and your remote server depends on the certificates you trust locally, the verification settings you choose, and system-level config that can override Git’s own. A missing root CA file, outdated OpenSSL library, or an environment variable forcing --insecure can spiral into broken builds or silent security leaks.
To tune Git’s TLS settings, start by checking the system’s certificate store. Most platforms keep it in /etc/ssl/certs or the OS keychain. Git uses the underlying libcurl or OpenSSL implementation. Point http.sslCAInfo in your Git config to a valid CA bundle. Verify with:
git config --global http.sslCAInfo /path/to/cacert.pem
If you’re working in ephemeral containers or CI agents, make sure the bundle travels with the build image. A missing bundle in a scratch container is the most common reason TLS fails in automation.