azure - 出现错误 : Could not fetch access token for Azure when deploying using Azure DEVOPS

标签 azure azure-devops

我尝试使用 Azure DEVOPS CI/CD Pipelines 部署应用程序,但收到以下错误:

2022-01-19T19:55:37.5454688Z ##[错误]错误:无法获取应用服务“xxxxx”发布凭据。错误:无法获取 Azure 的访问 token 。验证使用的服务主体是否有效且未过期。欲了解更多信息,请参阅https://aka.ms/azureappservicedeploytsg

我检查了客户端 key ,它们已过期。我要求管理员创建一个新的,但在部署时仍然收到相同的错误。

有人有想法吗?可能是因为我们还有这两个过期的 key ?我需要更改应用程序设置中的某些内容吗? (我不这么认为对吗?)

se

最佳答案

当我的构建管道上出现此错误时,我能够按照this answer中的步骤进行操作。 (复制如下)来解决它。我唯一要做的另一件事是在第 5 步中点击“验证”之前选择一个“资源组”。

  1. Go to Project settings > Service connections, and then select the service connection you want to modify.

  2. Select Edit in the upper-right corner, and then make any change to your service connection. The easiest and recommended change is to add a description.

  3. Select Save to save the service connection. Don't try to verify the service connection at this step.

  4. Exit the service connection edit window, and then refresh the service connections page.

  5. Select Edit in the upper-right corner, and now select Verify. (You may need to select a valid Resource group first if one isn't already selected.)

  6. Select Save to save your service connection.

关于azure - 出现错误 : Could not fetch access token for Azure when deploying using Azure DEVOPS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70777248/

相关文章:

Azure存储: BlobClient keeps resetting itself while uploading large files

azure - AKS 添加非 Azure 节点

git - 在 GitHub 和 VSTS 上托管 git 存储库

git - 是否可以在 Azure Release 管道中从另一个团队项目克隆 Git 存储库?

azure-devops - 在管道构建期间获取 sql server (express) azure devops

c# - DocumentDB transient 故障处理最佳实践

azure - 如何将文件从逻辑应用程序发送到功能应用程序?

wcf - Azure 上基于房间的发布/订阅应用程序的负载平衡

azure-devops - 在 azure-devops 中的发布管道期间创建标签

.net - Azure、.Net、Cobertura - ##[警告]找到多个文件或目录匹配项