az devops登录挂起 [英] az devops login hangs

查看:227
本文介绍了az devops登录挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Windows 10,Azure PowerShell Az模块,DevOps扩展0.18.0

I'm working on Windows 10, Azure PowerShell Az module, DevOps extension 0.18.0

我已登录DevOps实例,并能够运行所有相关命令.现在,我需要登录到其他组织/项目.每次执行login子命令时,窗口都会挂起并锁定,我必须重新启动PowerShell ISE才能重试.

I am logged into a DevOps instance and able to run all related commands. Now, I need to login to a different org / project. Every time I execute the login subcommand the window hangs and locks up, I have to restart the PowerShell ISE to try again.

我正在使用的命令(我已经尝试了几种变体)是:

The commands I'm working with (I've tried several variations) are:

> az login 
> $env:AZURE_DEVOPS_EXT_PAT ='{PAT}' 
> az devops login --organization https://dev.azure.com/{org} --debug

在这里挂!!

下面的调试日志

az devops登录--organization https://dev.azure.com/{org} -调试

CategoryInfo          : NotSpecified: (Command argumen...nn', '--debug']:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError   Event: Cli.PreExecute [] Event: CommandParser.OnGlobalArgumentsCreate
[<function CLILogging.on_global_arguments at 0x03A171E0>, <function 
OutputProducer.on_global_arguments at 0x03B3AA98>, <function
CLIQuery.on_global_arguments at 0x03B5CCD8>] Event:
CommandInvoker.OnPreCommandTableCreate [] Modules found from index for
'devops': ['azext_devops'] Loading command modules: Name              
Load Time    Groups  Commands Total (0)                 0.000        
0         0 These extensions are not installed and will be skipped:
['azext_ai_examples', 'azext_ai_did_you_mean_this'] Loading
extensions: Name                  Load Time    Groups  Commands 
Directory azure-devops              0.110        60       191 
C:\Users\{username}\.azure\cliextensions\azure-devops Total (1)          
0.110        60       191   Loaded 60 groups, 191 commands. Found a match in the command table for 'devops login' Event:
CommandInvoker.OnPreCommandTableTruncate [<function
AzCliLogging.init_command_file_logging at 0x03C2B978>]
az_command_data_logger : command args: devops login --organization {}
--debug metadata file logging enabled - writing logs to 'C:\Users\{username}\.azure\commands'. Event:
CommandInvoker.OnPreArgumentLoad [<function
register_global_subscription_argument.<locals>.add_subscription_parameter
at 0x03D69660>] Event: CommandInvoker.OnPostArgumentLoad [] Event:
CommandInvoker.OnPostCommandTableCreate [<function
register_ids_argument.<locals>.add_ids_arguments at 0x03D69618>,
<function  register_cache_arguments.<locals>.add_cache_arguments at
0x03D69E40>] Event: CommandInvoker.OnCommandTableLoaded [] Event:
CommandInvoker.OnPreParseArgs [] Event: CommandInvoker.OnPostParseArgs
[<function OutputProducer.handle_output_argument at 0x03B3AAE0>,
<function CLIQuery.handle_query_parameter  at 0x03B5CD20>, <function
register_ids_argument.<locals>.parse_ids_arguments at 0x03D69DF8>,
<function DevCommandsLoader.post_parse_args at  0x03CF6150>]
az_command_data_logger : extension name: azure-devops
az_command_data_logger : extension version: 0.18.0

  • 我已经重新启动Windows 10
  • 我已退出az(az注销)
  • 我已经退出devops(az devops注销)
  • 我总是在提升的权限下运行PowerShell ISE(管理员)
  • 我已经确认了所有这些,我仍然可以从我开始的组织/项目中访问DevOps(管道,发行版等).因此注销也失败.

    I've confirmed after all of this, I can still access DevOps (pipelines, releases, etc.) from the org/project I started from. so logout is failing as well.

    这是怎么回事?任何想法为什么会发生这种情况?

    What is going on? Any ideas why this is happening?

    推荐答案

    如果设置 $ env:AZURE_DEVOPS_EXT_PAT ='{PAT}',则无需运行 az devops登录.您可以开始使用所需的命令.例如: az存储库列表--org https://dev.azure.com/{ORG} --project {PROJECT} .

    If you set $env:AZURE_DEVOPS_EXT_PAT='{PAT}' there is no need to run az devops login. You can just start using the commands that you want. E.g.: az repos list --org https://dev.azure.com/{ORG} --project {PROJECT}.

    它似乎挂起,因为它未能安装keyring〜= 17.1.1软件包(及其dep).您可以像这样手动添加该软件包: py -m pip install --target〜\ .azure \ cliextensions \ azure-devops keyring〜= 17.1.1 .

    And it seems that it hangs because it fails to install the keyring~=17.1.1 package (and its deps). You could add that package manually like this: py -m pip install --target ~\.azure\cliextensions\azure-devops keyring~=17.1.1.

    在GitHub上的问题: [错误] az devops登录第一次失败,除非以管理员身份运行·问题#438·Azure/azure-devops-cli-extension

    Issue on GitHub: [Bug] az devops login fails the first time unless run as admin · Issue #438 · Azure/azure-devops-cli-extension

    指定了密钥环软件包版本的文件:azure-devops/azext_devops/dev/common/pip_helper.py

    File where the keyring package version is specified: azure-devops/azext_devops/dev/common/pip_helper.py

    这篇关于az devops登录挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆