Anthony Chu Contact Me

Site-Specific Git Deployment Credentials - Azure Web Apps

Sunday, July 19, 2015

Git is a popular way to deploy a web app to Azure. After setting up a local git repository, the portal seems to suggest that the only valid deployment credentials is tied to your Microsoft Account. This might be okay for adhoc deployments from your local machine; but you probably shouldn't use your personal credentials to deploy from a CI server.

Thankfully, each web app comes with its own site-specific deployment credentials. One way (seems to be the only way) to access them is by downloading the site's publishing profile.

Then open it up in an editor. Inside you'll find a username and password that is specific to the site (web app).

The username and password can be used to deploy the site via git or FTP. Note that the git deployment URL in Azure might already include a username, so you might need to remove it to change it to the site-specific deployment username.

This "trick" is actually documented in the Project Kudu documentation.