简体   繁体   中英

AZ Login from CLI issue - SELF SIGNED CERTIFICATE

Trying to logon to my Azure portal account through the AZ CLI.

At the az login command I get redirected to a browser to sign into Azure, sign in is successful, CLI says "You have logged in, now let us find all the subscriptions to which you have access..." Then I get this error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1125) enter image description here

I tried reproducing the issue with the command which you have used, I got redirected to the browser and got back and logged in successfully.

在此处输入图片说明

Referring to the error message which you got looks like you don't have a fully signed certificate.

To use Azure CLI with the aSDK, you must trust the CA root certificate on your remote machine.

Usually, these certificate locations will depend on where we've installed our Python packages

With below command we can get it and make a note of it…

python -c "import certifi; print(certifi.where())"

Refer to Microsoft documentation for Setting up certificates for Azure CLI

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM