Azure - 部署连接到VSTS的Web应用程序会导致错误:存在冲突。与现有ScmType冲突:VSO

时间:2017-09-11 12:58:13

标签: azure azure-devops azure-resource-manager

我正在使用arm模板通过visual studio部署azure web app(app services)。起初,连接到VSTS源控件时出现问题。我没有意识到VSTS git是私有的,所以我必须在VSTS中创建别名凭据并在arm模板中使用这些凭据。得到解决方案here

此后,Web应用程序已成功部署并连接到VSTS。但是当我试图重复这个时,我得到一个错误:

  

发生了冲突。与现有ScmType冲突:VSO。

在部署之前,我首先删除先前部署中的所有资源。所以总的来说,我只是试图重复第一次相同的部署,但由于某种原因,它不起作用!

模板看起来像这样:

{
      "type": "Microsoft.Web/sites",
      "kind": "app",
      "name": "[parameters('site_name')]",
      "apiVersion": "2016-08-01",
      "location": "North Europe",
      "scale": null,
      "properties": {
        "enabled": true,
        "hostNameSslStates": [
          {
            "name": "[concat(parameters('site_name'),'.azurewebsites.net')]",
            "sslState": "Disabled",
            "virtualIP": null,
            "thumbprint": null,
            "toUpdate": null,
            "hostType": "Standard"
          },
          {
            "name": "[concat(parameters('site_name'),'.scm.azurewebsites.net')]",
            "sslState": "Disabled",
            "virtualIP": null,
            "thumbprint": null,
            "toUpdate": null,
            "hostType": "Repository"
          }
        ],
        "serverFarmId": "[parameters('site_serverFarmId')]",
        "reserved": false,
        "siteConfig": {
          "connectionStrings": [
            {
              "connectionString": "[parameters('connection_string_value')]",
              "name": "ServerConnectionString"
            }
          ]
        },
        "scmSiteAlsoStopped": false,
        "hostingEnvironmentProfile": null,
        "clientAffinityEnabled": true,
        "clientCertEnabled": false,
        "hostNamesDisabled": false,
        "containerSize": 0,
        "dailyMemoryTimeQuota": 0,
        "cloningInfo": null
      },
      "resources": [
        {
          "apiVersion": "2016-03-01",
          "name": "web",
          "type": "sourcecontrols",
          "dependsOn": [
            "[resourceId('Microsoft.Web/Sites', parameters('site_name'))]"
          ],
          "properties": {
            "repoUrl": "https://xxxx@xxxx.visualstudio.com/_git/xxxx",
            "branch": "master",
            "isManualIntegration": true
          }
        }
      ],
      "dependsOn": []
    }

完成错误:

{
  "Code": "BadRequest",
  "Message": "There was a conflict. Conflict with existing ScmType: VSO",
  "Target": null,
  "Details": [
    {
      "Message": "There was a conflict. Conflict with existing ScmType: VSO"
    },
    {
      "Code": "BadRequest"
    },
    {
      "ErrorEntity": {
        "ExtendedCode": "01020",
        "MessageTemplate": "There was a conflict. {0}",
        "Parameters": [
          "Conflict with existing ScmType: VSO"
        ],
        "Code": "BadRequest",
        "Message": "There was a conflict. Conflict with existing ScmType: VSO"
      }
    }
  ],
  "Innererror": null
}

有人知道这个错误意味着什么,我该怎么做才能纠正它?

0 个答案:

没有答案