我正在尝试将构建部署到 Azure WebApp。
在 Azure ( http://manage.windowsazure.com ) 中,我将 Web 应用链接到我的 Visual Studio Online(VSTS) 帐户。
在 VSTS 中,我使用单个任务(Azure Web App 部署)创建了一个发布定义;该任务配置为使用管理模块中定义的端点。服务端点配置为使用凭据。该凭据使用 Microsoft 帐户。
发布失败并出现以下错误:
2015-12-02T18:17:35.4422685Z AzurePSCmdletsVersion= 0.9.8.1
2015-12-02T18:17:35.5692677Z Get-ServiceEndpoint -Name foo -Context Microsoft.TeamFoundation.DistributedTask.Agent.Worker.Common.TaskContext
2015-12-02T18:19:07.5877546Z Username= ********
2015-12-02T18:19:07.5887893Z azureSubscriptionId= foo-foo-foo-foo-foo
2015-12-02T18:19:07.5907904Z azureSubscriptionName= Pay-As-You-Go
2015-12-02T18:19:07.6278127Z Add-AzureAccount -Credential $psCredential
2015-12-02T18:19:09.7755541Z ##[error]-Credential parameter can only be used with Organization ID credentials. For more information, please refer to http://go.microsoft.com/fwlink/?linkid=331007&clcid=0x409 for more information about the difference between an organizational account and a Microsoft account.
2015-12-02T18:19:09.9664413Z ##[error]There was an error with the Azure credentials used for deployment.
如何设置版本以使用 Microsoft 帐户作为 Azure 凭据?
最佳答案
目前没有任何方法可以使用 Microsoft 帐户凭据从 VSO 服务端点连接到 Azure。您需要使用组织帐户。如果没有,可以使用“基于证书”的身份验证轻松连接到 Azure。点击this link获取您的订阅文件,然后将订阅文件中的认证字符串粘贴到VSO“管理证书”区域。
关于azure - Web应用程序部署到Azure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34050602/