Skip to content

Commit 94e5bf1

Browse files
committed
touchups
1 parent 92dba9d commit 94e5bf1

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

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

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ To complete the steps in this article, you need:
3131
- If you want to use the Azure CLI commands, you need the latest version of the [Azure CLI installed](/cli/azure/install-azure-cli) on your local machine. Sign in to Azure using [az login](/cli/azure/reference-index#az-login).
3232
- If you want to run the Azure PowerShell commands, you need the latest version of [Azure PowerShell installed](/powershell/azure/install-azure-powershell). Sign in to Azure using [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount).
3333

34-
### Deployment user
34+
[!INCLUDE [Prepare repository](../../includes/app-service-deploy-prepare-repo.md)]
3535

36-
You need deployment user credentials to deploy your app. The deployment user is different from the Azure subscription user, and can use either [user-scope](deploy-configure-credentials.md#userscope) or [application-scope](deploy-configure-credentials.md#appscope) credentials.
36+
### Deployment user credentials
3737

38-
You can create a user-scope deployment user by running the Azure CLI command `az webapp deployment user set --user-name <username>`. You can also create the user on the **Local Git/FTPS credentials** tab in the **Deployment Center** of any App Service app. You only need a user name, not a password, to create and authenticate a user-scope deployment user for local Git deployment.
38+
You need deployment user credentials to authenticate and deploy your app. These are different from your Azure subscription credentials, and you can use either [user-scope](deploy-configure-credentials.md#userscope) or [application-scope](deploy-configure-credentials.md#appscope) credentials.
3939

40-
Once you create the user-scope deployment user, it applies to all the App Service apps in your subscription. For more information, see [Configure user-scope credentials](deploy-configure-credentials.md#userscope).
40+
A user-scope deployment user for local Git deployment only needs a user name, not a password. You can create the user-scope user name by running the Azure CLI command `az webapp deployment user set --user-name <username>`, or under **User-scope** on the **Local Git/FTPS credentials** tab of an app's **Deployment Center**.
4141

42-
An application-scope user is app-specific and is created automatically when you create the app. You can get the application-scope user credentials to use for deployment from the **Local Git/FTPS credentials** tab in your app's **Deployment Center**.
42+
Once you create your user-scope deployment user, you can use it for all the App Service apps you have access to. For more information, see [Configure user-scope credentials](deploy-configure-credentials.md#userscope).
4343

44-
[!INCLUDE [Prepare repository](../../includes/app-service-deploy-prepare-repo.md)]
44+
An application-scope deployment user is app-specific and is created automatically when you create an app. You can get the application-scope user credentials to use for deployment from the **Local Git/FTPS credentials** tab in the app's **Deployment Center**.
4545

4646
## Create and configure a Git-enabled app
4747

@@ -66,7 +66,7 @@ Either command produces output that includes a URL, such as:
6666
```output
6767
Local git is configured with url of 'https://[email protected]/myApp.git'
6868
```
69-
The URL contains the user-scope deployment user name. If there's no user-scope deployment user name, the URL uses the [application-scope user name](deploy-configure-credentials.md#appscope), for example `https://[email protected]/myApp.git`.
69+
The preceding URL contains the user-scope deployment user name `contoso-user`. If you don't have a user-scope deployment user name, the URL uses the [application-scope user name](deploy-configure-credentials.md#appscope), for example `https://[email protected]/myApp.git`.
7070

7171
Use this Git clone URL to deploy your app in the next step.
7272

@@ -95,12 +95,11 @@ Use this Git clone URL to deploy your app in the next step.
9595

9696
# [Azure portal](#tab/portal)
9797

98-
### Create the app
98+
### Create the web app
9999

100-
In the [Azure portal](https://portal.azure.com), create an App Service app by following any of the portal-based instructions under **Create your first app** at [Getting started with Azure App Service](getting-started.md).
100+
In the [Azure portal](https://portal.azure.com), create an App Service app by following any of the portal-based instructions under **Create your first app** at [Getting started with Azure App Service](getting-started.md). For the sample repository, use the [Node.js](getting-started.md?pivots=stack-nodejs#nodejs) instructions and select **Node 20 LTS** for **Runtime stack** on the **Basics** tab.
101101

102-
- For the sample repository, use the [Node.js](getting-started.md?pivots=stack-nodejs#nodejs) instructions and select **Node 20 LTS** for **Runtime stack** on the **Basics** tab.
103-
- At the bottom of the **Deployment** tab on the **Create Web App** page, set **Basic Authentication** to **Enabled**.
102+
At the bottom of the **Deployment** tab on the **Create Web App** page, set **Basic Authentication** to **Enabled**.
104103

105104
When the app is created, select **Go to resource**.
106105

@@ -121,7 +120,7 @@ To deploy the app to Azure, create a remote branch if necessary, make sure you'r
121120

122121
### Create the remote branch
123122

124-
If you used Azure PowerShell`New-AzWebApp` to create the app from the sample code, the `azure` remote was already created. Otherwise, follow these instructions to create the remote:
123+
If you used Azure PowerShell `New-AzWebApp` to create the app from the sample code, the `azure` remote was already created. Otherwise, follow these instructions to create the remote:
125124

126125
1. In a local terminal, change directory to the root of your cloned Git repository.
127126
1. Add a Git remote named `azure` by using your Git clone URL. If you don't know your Git clone URL, use `https://<app-name>.scm.azurewebsites.net/<app-name>.git`.
@@ -133,7 +132,7 @@ If you used Azure PowerShell`New-AzWebApp` to create the app from the sample cod
133132
<a name="change-deployment-branch"></a>
134133
### Push to the correct branch
135134

136-
App Service repositories deploy files to the `master` branch by default. If your local code is in the `master` branch of your repository, you can now deploy your app by running `git push azure master`.
135+
App Service repositories deploy files to the `master` branch by default. If your local files are in the `master` branch of your repository, you can now deploy your app by running `git push azure master`.
137136

138137
However, many Git repositories, including the sample code repository for this article, use `main` or another default branch name. To deploy to the correct branch, you must either explicitly deploy to the remote `master` branch, or change the deployment branch to `main` or other branch name and deploy to that branch.
139138

@@ -160,7 +159,7 @@ Or change your app's `DEPLOYMENT_BRANCH` app setting to `main` and then push dir
160159

161160
### Finish and verify the deployment
162161

163-
After you push your code, if the **Git Credential Manager** dialog appears, enter your user-scope deployment user name or application-scope user name and password. If your Git remote URL already contains the sign-in information, you aren't prompted to enter it.
162+
If the **Git Credential Manager** dialog appears after you push your code, enter your user-scope deployment user name or application-scope user name and password. If your Git remote URL already contains the sign-in information, you aren't prompted to enter it.
164163

165164
Review the output from the `push` command. You might see runtime-specific automation, such as `npm install` for Node.js, `MSBuild` for ASP.NET, or `pip install` for Python. If you get errors, see [Troubleshoot deployment](#troubleshoot-deployment).
166165

@@ -174,7 +173,7 @@ The following common errors might occur when you use local Git to publish to an
174173
|---|---|---|
175174
|`Unable to access '[siteURL]': Failed to connect to [scmAddress]`|The app isn't running.|In the Azure portal, start the app. Git deployment isn't available when the web app is stopped.|
176175
|`Couldn't resolve host 'hostname'`|The address information for the `azure` remote is incorrect.|Use the `git remote -v` command to list all remotes and their associated URLs. Verify that the URL for the `azure` remote is correct. If necessary, remove the incorrect URL by using `git remote remove` and then recreate the remote with the correct URL.|
177-
|`No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as 'main'.`|You didn't specify a branch when you ran `git push` or you didn't set the `push.default` value in `.gitconfig`.|Run `git push` again and specify the main branch with `git push azure main`.|
176+
|`No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as 'main'.`|You didn't specify a branch when you ran `git push` or you didn't set the `push.default` value in `.gitconfig`.|Run `git push` again and specify the correct branch with `git push azure <branch>`.|
178177
|`Error - Changes committed to remote repository but deployment to website failed.`|You pushed a local branch that doesn't match the app deployment branch on `azure`.|Verify that the current branch is `master`, or change the deployment branch by following the instructions at [Push to the correct branch](#push-to-the-correct-branch). |
179178
|`src refspec [branchname] does not match any.`|You tried to push to a branch other than `main` on the `azure` remote.|Run `git push` again, and specify the `main` branch with `git push azure main`.|
180179
|`RPC failed; result=22, HTTP code = 5xx.`|You tried to push a large Git repository over HTTPS.|Change the git configuration on the local computer to set a higher value for `postBuffer`. For example: `git config --global http.postBuffer 524288000`.|

includes/app-service-deploy-prepare-repo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.author: cephalin
77
ms.custom: "include file"
88
---
99

10-
## Prepare your repository
10+
### Prepare your repository
1111

1212
To get automated builds from the App Service build server, make sure that your repository root has the correct files in your project.
1313

0 commit comments

Comments
 (0)