Azure-devops-cli-extension: Can not install extension

Created on 14 Feb 2019  路  7Comments  路  Source: Azure/azure-devops-cli-extension

When trying to install the client in either a cmd or Powershell console I am getting the following error.

Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='github-production-release-asset-2e65be.s3.amazonaws.com', port=443): Max retries exceeded with url: /107708057/33396e00-1f2a-11e9-8234-2958109077ec?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190214%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190214T133042Z&X-Amz-Expires=300&X-Amz-Signature=7e9d87d1f9376748b7af61992287900f1af6b81b3ba95c7c286c0792ea97c2c2&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dazure_devops-0.2.0-py2.py3-none-any.whl&response-content-type=application%2Foctet-stream (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

I have tried several other extension installs and they are working as expected.

Most helpful comment

@bagstac : By any chance do you have fiddler or some other networking tool running ? This error is basically that CLI is not able to valid the cert of url which is hosting our package

If you have fiddler or some proxy setup running on system please try to close it and then try installing

I can give 3 tricks to by pass this issue

  1. Download the extension locally (manually), you can download from browser as well, just open this
    https://github.com/Microsoft/azure-devops-cli-extension/releases/download/0.2.0/azure_devops-0.2.0-py2.py3-none-any.whl
    Then install it using
    az extension add --source <<path to downloaded whl>> -y --debug
  1. This is untested
    NO_PROXY=1
    This basically tells cli to bypass proxy

  2. THIS IS UNTESTED AND NOT RECOMMENDED
    Set this environment variable
    AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1
    and then try normal install command
    do remember to launch a new console session after setting up the environment variable

All 7 comments

@bagstac
command to install our extension is az extension add -n azure-devops
can you please share the ouput of az extension add -n azure-devops --debug, this will help us in debugging the issue better

also to make sure other extension installs are working fine can you try:
az extension add -n azure-cli-iot-ext --debug

So neither of those appears to be working. I must have been lucky when I installed log-analytics. If you would like the install log from the second command please let me know.

azure-cli version 2.0.58
Here is the error log for az extension add -n azure-devops --debug

PS H:> az extension add -n azure-devops --debug
az : DEBUG: Command arguments: ['extension', 'add', '-n', 'azure-devops', '--debug']
At line:1 char:1

  • az extension add -n azure-devops --debug
  • ~~~~~~~~

    • CategoryInfo : NotSpecified: (DEBUG: Command ...ps', '--debug']:String) [], RemoteException

    • FullyQualifiedErrorId : NativeCommandError

DEBUG: Event: Cli.PreExecute []
DEBUG: Event: CommandParser.OnGlobalArgumentsCreate [, , ]
DEBUG: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: Installed command modules ['acr', 'acs', 'advisor', 'ams', 'appservice', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'configure', 'consumption', 'container', 'cosmosdb', 'dla', 'dls', 'dms', 'eventgrid',
'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'interactive', 'iot', 'iotcentral', 'keyvault', 'kusto', 'lab', 'maps', 'monitor', 'network', 'policyinsights', 'profile', 'rdbms', 'redis', 'relay', 'reservations', 'resource', 'role', 'search', 'security',
'servicebus', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'vm']
DEBUG: Loaded module 'acr' in 0.006 seconds.
DEBUG: Loaded module 'acs' in 0.006 seconds.
DEBUG: Loaded module 'advisor' in 0.003 seconds.
DEBUG: Event: CommandLoader.OnLoadCommandTable []
DEBUG: Loaded module 'ams' in 0.014 seconds.
DEBUG: Loaded module 'appservice' in 0.008 seconds.
DEBUG: Loaded module 'backup' in 0.005 seconds.
DEBUG: Event: CommandLoader.OnLoadCommandTable []
DEBUG: Loaded module 'batch' in 0.012 seconds.
DEBUG: Loaded module 'batchai' in 0.006 seconds.
DEBUG: Loaded module 'billing' in 0.004 seconds.
DEBUG: Loaded module 'botservice' in 0.005 seconds.
DEBUG: Event: CommandLoader.OnLoadCommandTable []
DEBUG: Loaded module 'cdn' in 0.006 seconds.
DEBUG: Loaded module 'cloud' in 0.004 seconds.
DEBUG: Loaded module 'cognitiveservices' in 0.004 seconds.
DEBUG: Loaded module 'configure' in 0.002 seconds.
DEBUG: Loaded module 'consumption' in 0.005 seconds.
DEBUG: Loaded module 'container' in 0.006 seconds.
DEBUG: Loaded module 'cosmosdb' in 0.009 seconds.
DEBUG: Loaded module 'dla' in 0.011 seconds.
DEBUG: Loaded module 'dls' in 0.006 seconds.
DEBUG: Loaded module 'dms' in 0.004 seconds.
DEBUG: Loaded module 'eventgrid' in 0.005 seconds.
DEBUG: Loaded module 'eventhubs' in 0.005 seconds.
DEBUG: Loaded module 'extension' in 0.003 seconds.
DEBUG: Loaded module 'feedback' in 0.003 seconds.
DEBUG: Loaded module 'find' in 0.003 seconds.
DEBUG: Loaded module 'hdinsight' in 0.004 seconds.
DEBUG: Loaded module 'interactive' in 0.001 seconds.
DEBUG: Loaded module 'iot' in 0.006 seconds.
DEBUG: Loaded module 'iotcentral' in 0.004 seconds.
DEBUG: Loaded module 'keyvault' in 0.008 seconds.
DEBUG: Loaded module 'kusto' in 0.005 seconds.
DEBUG: Loaded module 'lab' in 0.006 seconds.
DEBUG: Loaded module 'maps' in 0.004 seconds.
DEBUG: Loaded module 'monitor' in 0.008 seconds.
DEBUG: Loaded module 'network' in 0.024 seconds.
DEBUG: Loaded module 'policyinsights' in 0.004 seconds.
DEBUG: Loaded module 'profile' in 0.004 seconds.
DEBUG: Loaded module 'rdbms' in 0.007 seconds.
DEBUG: Loaded module 'redis' in 0.005 seconds.
DEBUG: Loaded module 'relay' in 0.005 seconds.
DEBUG: Loaded module 'reservations' in 0.005 seconds.
DEBUG: Loaded module 'resource' in 0.009 seconds.
DEBUG: Loaded module 'role' in 0.006 seconds.
DEBUG: Loaded module 'search' in 0.004 seconds.
DEBUG: Loaded module 'security' in 0.005 seconds.
DEBUG: Loaded module 'servicebus' in 0.006 seconds.
DEBUG: Loaded module 'servicefabric' in 0.004 seconds.
DEBUG: Loaded module 'signalr' in 0.004 seconds.
DEBUG: Loaded module 'sql' in 0.008 seconds.
DEBUG: Loaded module 'sqlvm' in 0.006 seconds.
DEBUG: Event: CommandLoader.OnLoadCommandTable []
DEBUG: Loaded module 'storage' in 0.030 seconds.
DEBUG: Loaded module 'vm' in 0.016 seconds.
DEBUG: Loaded all modules in 0.344 seconds. (note: there's always an overhead with the first module loaded)
DEBUG: Extensions directory: 'C:\Users\beba.azure\cliextensions'
DEBUG: Found 1 extensions: ['log-analytics']
DEBUG: Extensions directory: 'C:\Users\beba.azure\cliextensions'
DEBUG: Loaded extension 'log-analytics' in 0.039 seconds.
DEBUG: Event: CommandInvoker.OnPreCommandTableTruncate []
DEBUG: Event: CommandInvoker.OnPostCommandTableCreate [.add_subscription_parameter at 0x03D6CC00>, .add_ids_arguments at 0x03F12F60>]
DEBUG: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: Event: CommandInvoker.OnPreParseArgs []
DEBUG: Event: CommandInvoker.OnPostParseArgs [, , .parse_ids_arguments at 0x03F12FA8>, 0x04B72198>]
DEBUG: Extensions directory: 'C:\Users\beba.azure\cliextensions'
DEBUG: urllib3.connectionpool : Starting new HTTPS connection (1): aka.ms:443
DEBUG: urllib3.connectionpool : https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0
DEBUG: urllib3.connectionpool : Starting new HTTPS connection (1): azurecliextensionsync.blob.core.windows.net:443
DEBUG: urllib3.connectionpool : https://azurecliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 80282
DEBUG: Candidates ['azure_devops-0.2.0-py2.py3-none-any.whl']
DEBUG: Candidates ['azure_devops-0.2.0-py2.py3-none-any.whl']
DEBUG: Candidates ['azure_devops-0.2.0-py2.py3-none-any.whl']
DEBUG: Candidates ['azure_devops-0.2.0-py2.py3-none-any.whl']
DEBUG: Choosing the latest of the remaining candidates.
DEBUG: Chosen {'downloadUrl': 'https://github.com/Microsoft/azure-devops-cli-extension/releases/download/0.2.0/azure_devops-0.2.0-py2.py3-none-any.whl', 'filename': 'azure_devops-0.2.0-py2.py3-none-any.whl', 'metadata': {'azext.minCliCoreVersion': '2.0.49',
'azext.isPreview': True, 'extensions': {'python.details': {'contacts': [{'email': '[email protected]', 'name': 'Microsoft', 'role': 'author'}], 'document_names': {'description': 'DESCRIPTION.rst'}, 'project_urls': {'Home':
'https://github.com/Microsoft/azure-devops-cli-extension'}}}, 'extras': [], 'generator': 'bdist_wheel (0.30.0)', 'license': 'MIT', 'metadata_version': '2.0', 'name': 'azure-devops', 'run_requires': [{'requires': ['python-dateutil (==2.7.3)', 'vsts (==0.1.20)']}],
'summary': 'Tools for managing Azure DevOps.', 'version': '0.2.0'}, 'sha256Digest': 'b044299d0e0b0719da0c1fcf06d9c54574fc9660a9405a904941f6f13f1e8dcb'}
DEBUG: Extension source is url? True
DEBUG: Extensions directory: 'C:\Users\beba.azure\cliextensions'
DEBUG: Downloading https://github.com/Microsoft/azure-devops-cli-extension/releases/download/0.2.0/azure_devops-0.2.0-py2.py3-none-any.whl to C:\Users\beba\AppData\Local\Temp\tmp_r08n73j\azure_devops-0.2.0-py2.py3-none-any.whl
DEBUG: urllib3.connectionpool : Starting new HTTPS connection (1): github.com:443
DEBUG: urllib3.connectionpool : https://github.com:443 "GET /Microsoft/azure-devops-cli-extension/releases/download/0.2.0/azure_devops-0.2.0-py2.py3-none-any.whl HTTP/1.1" 302 None
DEBUG: urllib3.connectionpool : Starting new HTTPS connection (1): github-production-release-asset-2e65be.s3.amazonaws.com:443
ERROR: Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='github-production-release-asset-2e65be.s3.amazonaws.com', port=443): Max retries exceeded with url: /107708057/33396e00-1f2a-11e9-8234-2958109077ec?X-Amz-Algorithm=AWS4-HMAC-SHA256&
X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20190214%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190214T174923Z&X-Amz-Expires=300&X-Amz-Signature=7f095e400f9cfa670e32c5835f1412a041ce5abc3855b0e1cff24a48d9f64e1f&X-Amz-SignedHeaders=host&actor_id=0&response-content-dispositio
n=attachment%3B%20filename%3Dazure_devops-0.2.0-py2.py3-none-any.whl&response-content-type=application%2Foctet-stream (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
INFO: Suppress exception There are no active accounts.
INFO: Suppress exception Please run 'az login' to setup account.
INFO: telemetry.save : Save telemetry record of length 2286 in cache
WARNING: telemetry.check : Negative: The C:\Users\beba.azure\telemetry.txt was modified at 2019-02-14 12:49:11.570672, which in less than 600.000000 s

@bagstac : By any chance do you have fiddler or some other networking tool running ? This error is basically that CLI is not able to valid the cert of url which is hosting our package

If you have fiddler or some proxy setup running on system please try to close it and then try installing

I can give 3 tricks to by pass this issue

  1. Download the extension locally (manually), you can download from browser as well, just open this
    https://github.com/Microsoft/azure-devops-cli-extension/releases/download/0.2.0/azure_devops-0.2.0-py2.py3-none-any.whl
    Then install it using
    az extension add --source <<path to downloaded whl>> -y --debug
  1. This is untested
    NO_PROXY=1
    This basically tells cli to bypass proxy

  2. THIS IS UNTESTED AND NOT RECOMMENDED
    Set this environment variable
    AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1
    and then try normal install command
    do remember to launch a new console session after setting up the environment variable

Thanks for the info, I ended up trying on a different network and it worked fine. I am assuming there is something causing an issue from my corporate network. I thought there was an issue with the cli when I could download a different extension and I could log in using the cli.

thanks for your help and have a great day.

@ishitam8 @snankani @atbagga as FYI, because we might be getting these kind of issues in future also

Hi,
I am also having this issue on our corporate network. We have an intercepting proxy that we have use.
Firstly, setting HTTP_PROXY and HTTPS_Proxy allows it to access the web, but then we get certificate errors. As a _quick fix_ I then set AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=0 with allows 'az login' to proceed but then i get the exact error as described by the OP but i get different output when I use --debug (logs attached)

It appears the python commands do not respect the 'disabling of connection verification' and still error at

Starting new HTTPS connection (1): pypi.org
Incremented Retry for (url='/simple/distro/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
az_extension_add_Azure-devops.log

Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)'),)': /simple/distro/

@Ivers07 Checkout the section here if it helps -
https://github.com/Azure/azure-cli/blob/dev/doc/use_cli_effectively.md#working-behind-a-proxy

Was this page helpful?
0 / 5 - 0 ratings