1
votes

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.

2

2 Answers

0
votes

I had a similar issue. I did the following:

  1. Browse to the file C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\certifi\cacert.pem.
  2. 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/.
  3. 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
0
votes

Had the same issue on Windows 10 with WSL2 ubuntu

Solved it by setting the proxy as an environment variable in powershell.

$Env:HTTP_PROXY = "http://proxy.corporate.com:1234/"
$Env:HTTPS_PROXY = "http://proxy.corporate.com:1234/"

Verify if setting was successful by viewing all env variables:

dir env: