Deploying your first application using Git
Intro
This article covers deploying to AppHarbor using the built-in Git repository. We also support deploying from GitHub, Bitbucket or CodePlex if you prefer using something other than Git or if you're already using one of those services.
(scroll to the bottom for videos)
Installing and Configuring Git
(Skip if you have already installed Git)
We recommend msysgit for Windows users. Github has excellent resources for getting started with Git. The Windows-relevant guides are:
Check out this Git crash course to learn Git basics.
Initialize a Git repository for your application
(Skip if you have already created a local repository for your application)
In Git Bash do:
cd path\to\my\application
git init
- Consider adding a
.gitignore
file, example here git add .
(this adds all files, except for those mentioned in .gitignore)git commit -m "Initial commit"
Deploy Application to AppHarbor
To deploy your first app, do the following:
- Go to appharbor.com
- Create an account
- Go to appharbor.com/applications
- Create an application
- Get the AppHarbor respository URL from the box on the
left
- Add the remote repository like this
git remote add appharbor MY_REPOSITORY_URL
- Deploy using
git push appharbor master
Fine Print
There are some requirements for the code you push to AppHarbor:
- The repository should contain only a single solution file. If
it contains multiple solution files, we look for -- and build --
one called
AppHarbor.sln
- The solution file should reference a web project
- Any references should be included in your repository
Please refer to our
Frequently Asked Questions and take a look at a sample
repository:
https://github.com/appharbor/appharbor-splash
Please use the latest version of Git. Old Git-versions are known to cause problems.
If any errors occur during a push, run this command to resize
the buffer (to 50 MB):
git config --system http.postBuffer 52428800
If AppHarbor cannot build your code, drop us a line at [email protected]. Alternatively, create a fresh solution with a simple ASP.NET MVC 3 web project (you can include a unit test project if you want) and go from there.
Videos
Several AppHarbor users have made videos on how to get started using AppHarbor