Azure DevOps 无法部署到 Azure Web App [英] Azure DevOps unable to deploy to Azure Web App

查看:38
本文介绍了Azure DevOps 无法部署到 Azure Web App的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试将应用从 A 公司拥有的 Azure DevOps 下的发布管道部署到 B 公司拥有的 Azure 上托管的 Azure 应用.

Am currently trying to deploy an app from a Release Pipeline under Azure DevOps owned by Company A to an Azure App hosted on Azure owned by Company B.

尝试发布停止 Azure 应用程序时不断收到此错误:

Keep on getting this error when attempting to release stop the Azure App:

错误:无法获取资源类型的资源 IDMicrosoft.Web/Sites"和资源名称AppName".错误:无法获取托管服务主体的访问令牌.请配置虚拟机的托管服务标识 (MSI)'https://aka.ms/azure-msi-docs'.状态代码:400,状态消息:错误请求

Error: Failed to get resource ID for resource type 'Microsoft.Web/Sites' and resource name 'AppName'. Error: Could not fetch access token for Managed Service Principal. Please configure Managed Service Identity (MSI) for virtual machine 'https://aka.ms/azure-msi-docs'. Status code: 400, status message: Bad Request

我不知道如何解决这个问题.

Am at a loss on how to solve this.

到目前为止所做的:

  • Web 应用程序是在 B 公司的 Azure 中创建的
  • 来自 DevOps 公司的用户 A 帐户被添加为公司 Azure AD 中的来宾用户
  • 用户拥有 Web 应用程序的贡献者权限
  • 托管服务标识在 Web 应用上设置为开启"
  • 在 Azure DevOps 中设置发布时,可以查看和选择公司 B 和 Web Apps 的订阅.

我很确定需要做更多的工作才能使发布部署工作,但经过深入搜索后,我一无所获.

Am quite sure that more needs to be in order for the release deployment to work, but after an intensive search, I was not able to find anything.

希望这里的任何人都可以提供建议.

Hope anyone here can advise.

推荐答案

设法找到了我遇到的问题的解决方案.这与 Azure 订阅上来宾帐户的访问权限有关.

Managed to find the solution to the problem I encountered. ​ ​It was related to the access rights of the guest account on the Azure subscription.

首先,托管服务身份"与此问题无关.

​First of all "Managed Service Identity" was not related to this issue.

这些是将 A 公司的 Azure DevOps 连接到 B 公司的 Azure 所遵循的步骤:

These are the steps that were followed to connect the Azure DevOps of Company A to the Azure of Company B:

  • 在 B 公司 Azure 中创建了 Web 应用
  • A 公司的 Azure DevOp 帐户已添加为访客用户"在B公司的Azure
  • DevOp 的帐户在 Azure订阅和网络应用.
  • 在 A 公司的 DevOps 中,添加Azure Resource Manager".选择将 B 公司的 Azure 设置为服务主体身份验证"
  • 保存 Azure Resource Manager 后,系统将提示您登录.您需要使用 B 公司 Azure 的管理员帐户登录.

这篇关于Azure DevOps 无法部署到 Azure Web App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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