Skip to content

Commit 8ddca9b

Browse files
authored
Merge pull request #79672 from cephalin/issue20359
#20359
2 parents 1faf5da + f506eac commit 8ddca9b

File tree

2 files changed

+23
-28
lines changed

2 files changed

+23
-28
lines changed

articles/app-service/deploy-local-git.md

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.workload: na
1212
ms.tgt_pltfrm: na
1313
ms.devlang: na
1414
ms.topic: article
15-
ms.date: 06/05/2018
15+
ms.date: 06/14/2019
1616
ms.author: dariagrigoriu;cephalin
1717
ms.custom: seodec18
1818

@@ -48,47 +48,42 @@ The easiest way to enable local Git deployment for your app with the Kudu build
4848

4949
[!INCLUDE [Configure a deployment user](../../includes/configure-deployment-user-no-h.md)]
5050

51+
> [!NOTE]
52+
> Instead of account-level credentials, you can also deploy with app-level credentials, which are automatically generated for each app.
53+
>
54+
5155
### Enable local Git with Kudu
5256

5357
To enable local Git deployment for your app with the Kudu build server, run [`az webapp deployment source config-local-git`](/cli/azure/webapp/deployment/source?view=azure-cli-latest#az-webapp-deployment-source-config-local-git) in the Cloud Shell.
5458

5559
```azurecli-interactive
56-
az webapp deployment source config-local-git --name <app_name> --resource-group <group_name>
60+
az webapp deployment source config-local-git --name <app-name> --resource-group <group-name>
5761
```
5862

5963
To create a Git-enabled app instead, run [`az webapp create`](/cli/azure/webapp?view=azure-cli-latest#az-webapp-create) in the Cloud Shell with the `--deployment-local-git` parameter.
6064

6165
```azurecli-interactive
62-
az webapp create --name <app_name> --resource-group <group_name> --plan <plan_name> --deployment-local-git
63-
```
64-
65-
The `az webapp create` command should give you something similar to the following output:
66-
67-
```json
68-
Local git is configured with url of 'https://<username>@<app_name>.scm.azurewebsites.net/<app_name>.git'
69-
{
70-
"availabilityState": "Normal",
71-
"clientAffinityEnabled": true,
72-
"clientCertEnabled": false,
73-
"cloningInfo": null,
74-
"containerSize": 0,
75-
"dailyMemoryTimeQuota": 0,
76-
"defaultHostName": "<app_name>.azurewebsites.net",
77-
"deploymentLocalGitUrl": "https://<username>@<app_name>.scm.azurewebsites.net/<app_name>.git",
78-
"enabled": true,
79-
< JSON data removed for brevity. >
80-
}
66+
az webapp create --name <app-name> --resource-group <group-name> --plan <plan-name> --deployment-local-git
8167
```
8268

8369
### Deploy your project
8470

85-
Back in the _local terminal window_, add an Azure remote to your local Git repository. Replace _\<url>_ with the URL of the Git remote that you got from [Enable Git for your app](#enable-local-git-with-kudu).
71+
Back in the _local terminal window_, add an Azure remote to your local Git repository. Replace _\<username>_ with the deployment user from [Configure a deployment user](#configure-a-deployment-user) and _\<app-name>_ with the app name from [Enable Git for your app](#enable-local-git-with-kudu).
8672

8773
```bash
88-
git remote add azure <url>
74+
git remote add azure https://<username>@<app-name>.scm.azurewebsites.net/<app-name>.git
8975
```
9076

91-
Push to the Azure remote to deploy your app with the following command. When prompted for a password, make sure that you enter the password you created in [Configure a deployment user](#configure-a-deployment-user), not the password you use to log in to the Azure portal.
77+
> [!NOTE]
78+
> To deploy with app-level credentials instead, get the credentials specific to your app by running the following command in the Cloud Shell:
79+
>
80+
> ```azurecli-interactive
81+
> az webapp deployment list-publishing-credentials -n <app-name> -g <group-name> --query scmUri --output tsv
82+
> ```
83+
>
84+
> Then use the command output to run `git remote add azure <url>` like above.
85+
86+
Push to the Azure remote to deploy your app with the following command. When prompted for a password, make sure that you enter the password you created in [Configure a deployment user](#configure-a-deployment-user), not the password you use to sign in to the Azure portal.
9287
9388
```bash
9489
git push azure master
@@ -211,7 +206,7 @@ git config --global http.postBuffer 524288000
211206
OR
212207
* `npm ERR! [modulename@version] preinstall: \make || gmake\`
213208

214-
## Additional Resources
209+
## Additional resources
215210

216211
* [Project Kudu documentation](https://github.com/projectkudu/kudu/wiki)
217212
* [Continuous Deployment to Azure App Service](deploy-continuous-deployment.md)

includes/configure-deployment-user-no-h.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ services: app-service
55
author: cephalin
66
ms.service: app-service
77
ms.topic: "include"
8-
ms.date: 02/02/2018
8+
ms.date: 06/14/2019
99
ms.author: cephalin
1010
ms.custom: "include file"
1111
---
1212

13-
In the Azure Cloud Shell, configure deployment credentials with the [`az webapp deployment user set`](/cli/azure/webapp/deployment/user?view=azure-cli-latest#az-webapp-deployment-user-set) command. This deployment user is required for FTP and local Git deployment to a web app. The username and password are account level. _They're different from your Azure subscription credentials._
13+
In the Azure Cloud Shell, configure deployment credentials with the [`az webapp deployment user set`](/cli/azure/webapp/deployment/user?view=azure-cli-latest#az-webapp-deployment-user-set) command. You use this deployment user for FTP and local Git deployment to a web app. The username and password are account level. _They're different from your Azure subscription credentials._
1414

15-
In the following example, replace *\<username>* and *\<password>*, including the brackets, with a new username and password. The username must be unique within Azure. The password must be at least eight characters long, with two of the following three elements: letters, numbers, and symbols.
15+
In the following example, replace *\<username>* and *\<password>*, including the brackets, with a new username and password. The username must be unique within Azure. The password must be at least eight characters long, with two of the following three elements: letters, numbers, and symbols.
1616

1717
```azurecli-interactive
1818
az webapp deployment user set --user-name <username> --password <password>

0 commit comments

Comments
 (0)