gpt4 book ai didi

Azure Github应用程序部署错误: Publish profile does not contain kudu URL

转载 作者:行者123 更新时间:2023-12-02 06:14:16 26 4
gpt4 key购买 nike

我遇到了这个错误,我看到 many people had the same error在 GitHub 上使用 Azure 的自动部署管道功能时。我已直接通过 Azure 门户上的部署管道将 GitHub 存储库链接到我的应用服务。一切似乎都工作正常,但在 GitHub Actions 页面上,我看到以下错误:

Failed to fetch credentials from Publish Profile. For more details on how to set publish profile credentials refer https://aka.ms/create-secrets-for-GitHub-workflows

Deployment Failed with Error: Error: Publish profile does not contain kudu URL

因此,我将在这里正式向遇到此问题的其他人发布此错误的解决方案。

最佳答案

该解决方案来自 the folks on this thread ,因此我不因提出该解决方案而获得任何荣誉。

正如后一条错误消息所暗示的那样,Azure 不接受部署凭据中的 publishURL。默认情况下,当您设置自动化管道时,会在您的存储库中创建 GitHub Secret。它的名称类似于 AZUREAPPSERVICE_PUBLISHPROFILE_012345...,它包含部署凭据。您必须更改此配置文件中的一个 URL 才能使其正常工作。简而言之,这就是你必须做的:

  1. 从部署中心的 Azure 门户获取部署凭据文件
  2. 更改 publishURL 旁边的 publishMethod="MSDeploy" 。它应该是 publishURL="your-app-service.scm.azurewebsites.net"
  3. 将该部署凭据文本复制到 GitHub 存储库上的 Azure GitHub key Value 中,然后重新运行失败的作业。

更详细的解释

要获取部署凭证的文本(您必须在之后对其进行编辑),您必须转到 Azure Portal -> your-app-service -> Deployment Center -> Deployment Credentials -> Get publish profile 。如果您遇到问题,可以在 the document linked in the first error 底部更好地解释相同的过程。确保执行此操作后不要输入 Reset Publish Profile,因为它会更改您的部署凭据中使用的密码,并且您必须再次执行所有这些操作。

获得此文档后,请在文本编辑器中将其打开。您必须将 publishURL 中的 publishProfile 字段更改为 profileName="your-app-service - Web Deploy"publishMethod="MSDeploy" 。不要使用像 foo-bar.publish.azurewebsites.windows.net:123 这样的 URL,而是将以下内容与您的实际应用服务标题放在一起: your-app-service.scm.azurewebsites.net

现在复制所有文本,导航到名为 AZUREAPPSERVICE_PUBLISHPROFILE_012345... 的 GitHub Secret,然后单击名称旁边的 Update。将新的部署凭据粘贴到 Value 框中,然后单击 Update secret

现在你已经完成了。导航到 GitHub Actions,单击失败的作业,然后单击右上角的 Re-run jobs 以使其再次运行。

关于Azure Github应用程序部署错误: Publish profile does not contain kudu URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64518967/

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