gpt4 book ai didi

Azure CLI authentication timed out(Azure CLI身份验证超时)

转载 作者:bug小助手 更新时间:2023-10-28 21:51:20 27 4
gpt4 key购买 nike



I keep getting the message 'Azure CLI authentication timed out' when running Xunit tests using dotnet test. Does anyone know how to fix this issue?

在使用DotNet测试运行X单元测试时,我不断收到消息‘Azure CLI身份验证超时’。有人知道如何解决这个问题吗?


更多回答
优秀答案推荐

Try using the synchronous version of the Azure CLI authentication. In my case I was using this code:

尝试使用Azure CLI身份验证的同步版本。在我的例子中,我使用的是以下代码:


var client = new SecretClient(new Uri(uri), new DefaultAzureCredential());
var secret = client.GetSecretAsync(key).Result;

I resolved the issue by changing the second line to this:

我通过将第二行更改为以下内容解决了该问题:


var secret = client.GetSecret(key);

更多回答

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com