Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Node.js, PHP and APIs

git clone from Azure DevOps fails with 'SSL certificate problem'

Errorfatal: unable to access 'https://dev.azure.com/org/project/_git/repo/': SSL certificate problem: self signed certificate in certificate chain

Short 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.

  • Applies to Git 2.4x, OpenSSL 3.0, Ubuntu 24.04, Windows 11
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 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 -showcerts
  2. 2Match what you see, then jump to its fix

    1. 1The 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. 2Browsers 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. 3The 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

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 chain
  • SSL 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/repo

3Verify

The clone runs without the certificate error.

git ls-remote https://dev.azure.com/org/project/_git/repo

Confirmed by git-scm.com

Did this fix it?

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.sslBackend

2Fix

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 schannel

3Verify

Clone again, or run ls-remote against the repository.

git ls-remote https://dev.azure.com/org/project/_git/repo

Confirmed by git-scm.com

Did this fix it?

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_SSL

2Fix

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_CAINFO

3Verify

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/repo

Confirmed by git-scm.com

Did this fix it?

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

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 fix

Back 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

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.