Azure CLI on WSL2 Ubunto

I’m using Azure CLI on WSL2 Ubuntu. I can successfully login but when I try to install AZ extensions using ‘az extension add’ I get this error:

Unable to get extension index.
Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='aka.ms', port=443): Max retries exceeded with url: /azure-cli-extension-index-v1 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

I have already installed ZScaler root certificates in Ubuntu (as well as many other applications like git, Java, etc.). Does anybody know how I can install ZScaler root certificates specifically for Azure CLI?

Hm, just checked and it seems you need to add “aka.ms” for SSL bypass. Looks like Azure CLI uses certificate pinning here.

1 Like

How can I do that? Where do I add “aka.ms”?

Thanks a lot! I ran this command I found on a google search and it worked:

export AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=anycontent
1 Like