git clone from Azure DevOps fails with 'SSL certificate problem'
fatal: unable to access 'https://dev.azure.com/org/project/_git/repo/': SSL certificate problem: self signed certificate in certificate chainShort answer
Git does not trust the certificate that signs the connection. This usually means a company proxy re-signs HTTPS traffic with its own CA, or the server uses an internal CA, and that CA is not in the file Git checks. Find the issuer first, then point Git at a bundle that contains it. Do not turn verification off.
Fix it fast
1Find out which cause you have
Print the certificate chain the server really sends and read the issuer of each one. A public CA means the problem is on your machine. A company or proxy name means a middlebox is re-signing the traffic.
openssl s_client -connect dev.azure.com:443 -servername dev.azure.com -showcerts2Match what you see, then jump to its fix
- 1
The issuer in the chain is your company, a security product or an internal CA, not a public authority.A proxy or an internal CA signs the connection and Git does not trust itFix - 2
Browsers on the same Windows machine open Azure DevOps fine, but Git does not, and the company CA is installed in Windows.Git uses a different certificate store than the one that holds your CAFix - 3
The error began after someone set http.sslCAInfo, GIT_SSL_CAINFO or a CA path, and the file is missing or lacks the issuer.An old per-machine or per-repository override points at a wrong fileFix
- 1
What does the error look like?
fatal: unable to access 'https://dev.azure.com/org/project/_git/repo/': SSL certificate problem: self signed certificate in certificate chainSSL certificate problem: self signed certificate in certificate chain
Cause 1 of 3
A proxy or an internal CA signs the connection and Git does not trust it
1Check
Show which CA file Git is using and where that setting comes from.
git config --show-origin --get-regexp "^http\."2Fix
Get the root CA certificate (PEM) from your IT team, put it in a bundle file, and point Git at that file. http.sslCAInfo names the file that Git verifies the peer with.
git config --global http.sslCAInfo /path/to/company-ca-bundle.pem
git clone https://dev.azure.com/org/project/_git/repo3Verify
The clone runs without the certificate error.
git ls-remote https://dev.azure.com/org/project/_git/repoConfirmed by git-scm.com
Cause 2 of 3
Git uses a different certificate store than the one that holds your CA
1Check
Look at which SSL backend Git is set to use.
git config --show-origin --get http.sslBackend2Fix
Git can use the schannel backend, which relies on the Windows certificate store (curl, which Git uses, can use the native store with Schannel). Set it and try again. If the error then names a revocation check, http.schannelCheckRevoke is the setting the Git manual describes for that case.
git config --global http.sslBackend schannel3Verify
Clone again, or run ls-remote against the repository.
git ls-remote https://dev.azure.com/org/project/_git/repoConfirmed by git-scm.com
Cause 3 of 3
An old per-machine or per-repository override points at a wrong file
1Check
http.sslCAInfo can be overridden by the GIT_SSL_CAINFO environment variable, and http.sslCAPath by GIT_SSL_CAPATH. Check both the config and the environment.
git config --show-origin --get-regexp "^http\.ssl"
env | grep GIT_SSL2Fix
Correct the path, or remove the override with git config --unset (or unset the variable) so that Git goes back to its default CA file.
git config --global --unset http.sslCAInfo
unset GIT_SSL_CAINFO3Verify
Run the clone again. Add the company CA with the first fix if the error returns.
git ls-remote https://dev.azure.com/org/project/_git/repoConfirmed by git-scm.com
How do I stop it coming back?
- Do not set http.sslVerify to false. The Git manual says it controls verification and defaults to true, and turning it off removes the protection.
- Keep the company CA bundle in one shared path and document the git config line for new machines.
- Use Git Credential Manager or SSH for Azure Repos as Microsoft's docs describe, so sign-in does not depend on this TLS path.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Back end
Apache returns 503 or 504 because PHP-FPM did not answer in time
Error dispatching request
Apache sent the request to PHP-FPM and gave up waiting.
3 causes, each with a fixBack end
Application Load Balancer returns 502 for a Node.js target
HTTPCode_ELB_502_Count
An ALB returns 502 when the target gives it something it cannot use: a refused or reset connection, a connection closed mid-request, a bad response, or a header over 32 K.
4 causes, each with a fixBack end
AWS SDK for PHP cannot get credentials from the instance profile metadata server
Error retrieving credentials from the instance profile metadata server.
The SDK tries the EC2 instance metadata service when it has no valid credentials from anywhere earlier in its chain.
4 causes, each with a fixBack end
AWS SDK for PHP rejects requests: the signature is from the future
Signature not yet current: {date} is still later than {date}
AWS compares the timestamp in your signed request with its own clock.
2 causes, each with a fixBack end
CodeIgniter 4 cannot write its cache files
CodeIgniter\Cache\Exceptions\CacheException: Cache unable to write to /var/www/app/writable/cache/
CodeIgniter 4's file cache needs a cache directory that the web server can really write to.
2 causes, each with a fixBack end
CodeIgniter 3 loads the model but the property is undefined
The model name you are loading is the name of a resource that is already being used: user
CodeIgniter 3 expects a model file named like its class, with the first letter capitalised, for example User_model.php holding class User_model.
2 causes, each with a fix