【问题标题】:Intellij azure-webapp plugin: Encoutering error when deploying to azure: 'No available subscription found in current account.'Intellij azure-webapp 插件:部署到 azure 时出现 Encoutering 错误:“在当前帐户中找不到可用订阅。”
【发布时间】:2020-07-15 08:12:05
【问题描述】:

我有一个有效的 Azure 免费试用订阅,我想将本地 Spring Boot 应用程序部署到 azure。

我已经在我的 pom.xml 中配置了 azure-webapp-maven-plugin。我正在使用 Intellij。

当我执行 mvn azure-webapp:deploy 时,我收到以下错误:

Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:1.9.1:deploy (default-cli) on project movie-catalog-service: Encoutering error when deploying to azure: 'No available subscription found in current account.'

编辑 1:我安装了 azure CLI,并且从我的命令行中它能够找到订阅。我跟着这个网址: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-macos?view=azure-cli-latest

但仍然无法从 Intellij 中找到相同的内容。

我尝试使用 Azure CLI 部署 azure-webapp。还是一样

【问题讨论】:

    标签: azure intellij-idea spring-boot-maven-plugin azure-webapps


    【解决方案1】:

    我遇到了同样的问题。问题现已打开here

    如果安装了 Azure CLI 并且正确检测到 sub。 您可以尝试使用 Azure CLI Auth 而不是 Maven 插件。 您可以通过在 pom 中的 azure-webapp-maven-plugin 配置中添加配置来做到这一点。

    <authType>azure_cli</authType>
    

    应该是这样的:

    <plugin> 
        <groupId>com.microsoft.azure</groupId>  
        <artifactId>azure-webapp-maven-plugin</artifactId>  
        <version>1.9.1</version>  
        <configuration>
          <schemaVersion>V2</schemaVersion>
          <authType>azure_cli</authType>
          <resourceGroup>someg-group</resourceGroup>
          <appName>some-app-name</appName>
          <pricingTier>P1v2</pricingTier>
          <region>westeurope</region>
          ....
    </plugin>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-13
      相关资源
      最近更新 更多