简体   繁体   中英

az login error: Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='login.microsoftonline.com', port=443)

Trying to install the Azure Devops CLI Extension

https://docs.microsoft.com/en-us/azure/devops/cli/?view=azure-devops

az extension add --name azure-devops

is the command I run

I get the following error message

Error Message I have tried

git config http.sslVerify "false"

I've tried to do multiple azure cli and powershell commands

I've set my context with

Set-AzContext -Subscription "xxxx-xxxx-xxxx-xxxx"

I don't understand what the issue is here.

I've tried running the commands with and without the VPN ( I use Pulse VPN for reference)

I've tried setting powershell's execution policy to Undefined

**Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser**

If someone could please let me know their thoughts on the specific error:

Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='objects.githubusercontent.com', port=443): Max retries exceeded with url: /github-production-release-asset-2e65be/107708057/665228bd-d0c3-4865-b029-624cbc247ca1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220701%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220701T163308Z&X-Amz-Expires=300&X-Amz-Signature=dd9381d3d71deeb228b151ec41140e8238f425ca9bf2882889c6bc9592c782e6&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=107708057&response-content-disposition=attachment%3B%20filename%3Dazure_devops-0.25.0-py2.py3-none-any.whl&response-content-type=application%2Foctet-stream (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')))

I've seen the post here Azure CLI Error and it was of no help

We have tried the same at our local to install the azure devops extension and it works successfully by following the MS DOC as given in question .

Here are the workaround we followed;

az login
Select-AzSubscription -Subscription subscriptionID

And it has been logged in successfully:- 在此处输入图像描述

After then installing az extension add --name azure-devops and it works.

在此处输入图像描述

Below are az --version we used ;

在此处输入图像描述

NOTE:- For the error make sure that you are using the latest version of az cli and enabled the port in your local ( Windows security> Advance settings> Inbound Rule> add new rule then add your required port (443) and enable the same ).

For configuration details here : How to open port in windows firwall .

For more information please refer the below links :-

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