azure-devops-cli-extension: [Bug] Latest release of azure-cli 2.6.0 breaks az devops login

Describe the bug Login to azure devops now fails with the latest azure-cli 2.6.0 release.

echo ${AZURE_DEVOPS_CLI_PAT} | sudo az devops login

Rolling back to azure-cli 2.5.1 fixes the issue

To Reproduce Azure Cli Version: azure-cli (2.6.0)

Azure-Devops extension version: Use az --version azure-devops (0.18.0)

Steps to reproduce the behavior:

  1. install azure-cli 2.6.0
  2. install azure-devops (az extension add -n azure-devops)
  3. Login to azure devops (az devops login or echo ${AZURE_DEVOPS_CLI_PAT} | sudo az devops login)
  4. Error:
Unable to use secure credential store in this environment.
Please refer to alternate methods at https://aka.ms/azure-devops-cli-auth
using Environment variable
or use 'az login'
_run_pip() missing 1 required positional argument: 'extension_path'

Expected behavior Successful login to azure devops

Screenshots azure-cli-issue

Debug logs

Command arguments: ['devops', 'login', '--debug']
Event: Cli.PreExecute []
Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x03CD1A98>, <function OutputProducer.on_global_arguments at 0x03C19978>, <function CLIQuery.on_global_arguments at 0x03C26BB8>]
Event: CommandInvoker.OnPreCommandTableCreate []
Installed command modules ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'configure', 'consumption', 'container', 'cosmosdb', 'deploymentmanager', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'interactive', 'iot', 'iotcentral', 'keyvault', 'kusto', 'lab', 'managedservices', 'maps', 'monitor', 'natgateway', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'reservations', 'resource', 'role', 'search', 'security', 'servicebus', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'vm']
Loaded module 'acr' in 0.006 seconds.
Loaded module 'acs' in 0.008 seconds.
Loaded module 'advisor' in 0.002 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'ams' in 0.006 seconds.
Loaded module 'apim' in 0.003 seconds.
Loaded module 'appconfig' in 0.003 seconds.
Loaded module 'appservice' in 0.008 seconds.
Loaded module 'aro' in 0.008 seconds.
Loaded module 'backup' in 0.005 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'batch' in 0.028 seconds.
Loaded module 'batchai' in 0.004 seconds.
Loaded module 'billing' in 0.003 seconds.
Loaded module 'botservice' in 0.004 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'cdn' in 0.004 seconds.
Loaded module 'cloud' in 0.002 seconds.
Loaded module 'cognitiveservices' in 0.002 seconds.
Loaded module 'configure' in 0.002 seconds.
Loaded module 'consumption' in 0.003 seconds.
Loaded module 'container' in 0.003 seconds.
Loaded module 'cosmosdb' in 0.007 seconds.
Loaded module 'deploymentmanager' in 0.003 seconds.
Loaded module 'dla' in 0.004 seconds.
Loaded module 'dls' in 0.004 seconds.
Loaded module 'dms' in 0.003 seconds.
Loaded module 'eventgrid' in 0.003 seconds.
Loaded module 'eventhubs' in 0.004 seconds.
Loaded module 'extension' in 0.001 seconds.
Loaded module 'feedback' in 0.001 seconds.
Loaded module 'find' in 0.001 seconds.
Loaded module 'hdinsight' in 0.003 seconds.
Loaded module 'interactive' in 0.001 seconds.
Loaded module 'iot' in 0.005 seconds.
Loaded module 'iotcentral' in 0.002 seconds.
Loaded module 'keyvault' in 0.006 seconds.
Loaded module 'kusto' in 0.003 seconds.
Loaded module 'lab' in 0.004 seconds.
Loaded module 'managedservices' in 0.002 seconds.
Loaded module 'maps' in 0.002 seconds.
Loaded module 'monitor' in 0.007 seconds.
Loaded module 'natgateway' in 0.002 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'netappfiles' in 0.004 seconds.
Loaded module 'network' in 0.026 seconds.
Loaded module 'policyinsights' in 0.003 seconds.
Loaded module 'privatedns' in 0.005 seconds.
Loaded module 'profile' in 0.002 seconds.
Loaded module 'rdbms' in 0.007 seconds.
Loaded module 'redis' in 0.003 seconds.
Loaded module 'relay' in 0.003 seconds.
Loaded module 'reservations' in 0.003 seconds.
Loaded module 'resource' in 0.008 seconds.
Loaded module 'role' in 0.005 seconds.
Loaded module 'search' in 0.002 seconds.
Loaded module 'security' in 0.003 seconds.
Loaded module 'servicebus' in 0.005 seconds.
Loaded module 'servicefabric' in 0.003 seconds.
Loaded module 'signalr' in 0.002 seconds.
Loaded module 'sql' in 0.007 seconds.
Loaded module 'sqlvm' in 0.003 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'storage' in 0.040 seconds.
Loaded module 'vm' in 0.013 seconds.
Loaded all modules in 0.318 seconds. (note: there's always an overhead with the first module loaded)
Found 1 extensions: ['azure-devops']
Extension compatibility result: is_compatible=True cli_core_version=2.6.0 min_required=2.2.0 max_required=None
Extensions directory: 'C:\Users\\.azure\cliextensions\azure-devops'
Loaded extension 'azure-devops' in 0.031 seconds.
Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x045A8660>]
az_command_data_logger : command args: devops login --debug
metadata file logging enabled - writing logs to 'C:\Users\\.azure\commands'.
Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x045B7DF8>]
Event: CommandInvoker.OnPostArgumentLoad []
Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x045DC660>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x045DC6F0>]
Event: CommandInvoker.OnCommandTableLoaded []
Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x04CDE8A0>]
Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x03C199C0>, <function CLIQuery.handle_query_parameter at 0x03C26C00>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x045DC6A8>, <function handler at 0x04B3EED0>, <function DevCommandsLoader.post_parse_args at 0x053D7E88>]
az_command_data_logger : extension name: azure-devops
az_command_data_logger : extension version: 0.18.0
Token:
installing keyring~=17.1.1
Unable to use secure credential store in this environment.
Please refer to alternate methods at https://aka.ms/azure-devops-cli-auth
using Environment variable
or use 'az login'
handling generic error
cli.azure.cli.core.util : _run_pip() missing 1 required positional argument: 'extension_path'
_run_pip() missing 1 required positional argument: 'extension_path'
Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x045A8780>]
az_command_data_logger : exit code: 1
Suppress exception There are no active accounts.
Suppress exception Please run 'az login' to setup account.
telemetry.save : Save telemetry record of length 2384 in cache
telemetry.check : Negative: The C:\Users\\.azure\telemetry.txt was modified at 2020-05-19 12:01:03.135038, which in less than 600.000000 s
command ran in 37.276 seconds.

Additional context This fails on both our Windows and Linux environments

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 7
  • Comments: 17 (2 by maintainers)

Most upvoted comments

Same here, go back one version solved it, using: choco install azure-cli --version=2.5.1

2.7.0 is out and the issue is gone 🥳

Same problem here

2020-05-19T19:11:45.6291013Z Unable to use secure credential store in this environment.
2020-05-19T19:11:45.6294451Z Please refer to alternate methods at https://aka.ms/azure-devops-cli-auth
2020-05-19T19:11:45.6294940Z using Environment variable
2020-05-19T19:11:45.6295389Z or use 'az login'
2020-05-19T19:11:45.6295894Z _run_pip() missing 1 required positional argument: 'extension_path'
2020-05-19T19:11:46.7680983Z Failed to update Universal Packages tooling.
2020-05-19T19:11:46.7683485Z  Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials.  Please see https://aka.ms/azure-devops-cli-auth for more information.

Versions:

2020-05-19T19:30:12.0514189Z {
2020-05-19T19:30:12.0515332Z   "azure-cli": "2.6.0",
2020-05-19T19:30:12.0515808Z   "azure-cli-command-modules-nspkg": "2.0.3",
2020-05-19T19:30:12.0516239Z   "azure-cli-core": "2.6.0",
2020-05-19T19:30:12.0516655Z   "azure-cli-nspkg": "3.0.4",
2020-05-19T19:30:12.0517064Z   "azure-cli-telemetry": "1.0.4",
2020-05-19T19:30:12.0517324Z   "extensions": {
2020-05-19T19:30:12.0517696Z     "azure-devops": "0.18.0"
2020-05-19T19:30:12.0517900Z   }
2020-05-19T19:30:12.0518027Z }

How to install old versions (Ubuntu):

apt-cache policy azure-cli (check which versions are available)
apt-get -y purge azure-cli (remove faulty version)
apt-get install -y azure-cli=2.0.81-1~xenial (install good version)
az extension remove --name azure-devops (in case you had the extension install)
az extension add -y --source https://github.com/Azure/azure-devops-cli-extension/releases/download/20190805.1/azure_devops-0.12.0-py2.py3-none-any.whl

For me installing back azure-cli 2.0.82 and devops extension 0.12.0 worked again.

Didn’t resolve my issue, but here is the link to an older msi if anyone needs it: https://azurecliprod.blob.core.windows.net/msi/azure-cli-2.5.1.msi