问题
could someone help me please:
I am using Azure cli behind proxy and I have fiddler running. I am running following commands and setup to login into my azure account,
SET ADAL_PYTHON_NO_SSL_VERIFY=1
SET AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1
az login --tenant <company domain>
It works well and gives me the list of subscriptions associated with my account.But, I need to install Azure-devops extension and when i run:
az extension add --name azure-devops
I am getting error: cli.azure.cli.core.util : An error occurred. Pip failed with status code 1.
looking into fiddler it says: 407 proxy authentication error while connecting to on premise nexus. My pip config:
[list]
format=columns
[global]
disable-pip-version-check = true
trusted-host = nexusurl
index = https://[username]:[userpassword]@<nexusurl>
index-url = https://[username]:[userpassword]@<nexusurl>
i couldnt figure out what i am missing.
回答1:
I had a similar issue. I did the following:
- Browse to the file
C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\certifi\cacert.pem
. - Edit the file and add the certs in Base-64 format that is part of the cert chain that takes you to https://pypi.org/simple/distro/.
- Run the following command to set the CA Bundle environment variable to this file.
.
setx REQUESTS_CA_BUNDLE "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\certifi\cacert.pem" /M
来源:https://stackoverflow.com/questions/61122231/pip-error-while-installing-azure-cli-extension-behind-proxy