A developer is configuring local Git deployment for an Azure App Service web app named `app-hr-prod`. The developer needs to set up deployment credentials, retrieve the Git clone URL, and push the application code from a local repository to Azure.
Which sequence of steps should the developer perform to complete this configuration?
- 1Configure user-level deployment credentials by executing: az webapp deployment user set --user-name <username> --password <password>
- 2Enable local Git deployment for the web app by executing: az webapp deployment source config-local-git --name app-hr-prod --resource-group hr-rg
- 3Register the Azure Git clone URL as a remote named 'azure' within the local Git repository: git remote add azure <git-clone-url>
- 4Deploy the application code to Azure by executing: git push azure main
Answer
Configure user-level deployment credentials, enable local Git deployment on the App Service, add the generated Git URL as a remote in your local repository, and push the code.
To configure local Git deployment for an Azure App Service web app, you must first establish the user-level deployment credentials. Next, you enable local Git deployment on the App Service web app to generate the Git repository clone URL. You then register this URL as a remote destination in your local Git repository. Finally, you push the local branch to the Azure remote to build and deploy the web application.
Step-by-Step Solution
Key Concept
Local Git deployment configuration for Azure App Service