-
Notifications
You must be signed in to change notification settings - Fork 62
Getting Started
WebGit .NET is an ASP.NET MVC application, designed to allow for Git Smart HTTP hosting in a Windows environment.
WebGit.NET requires the following components to be installed on a server in order to function properly:
- IIS
- ASP.NET MVC 3 (optional, if you choose to bin-deploy MVC on your server)
- msysgit
WebGit .NET can be set up just like any other ASP.NET MVC app. MSDN has resources on how to deploy an MVC app here: http://msdn.microsoft.com/en-us/library/bb386521.aspx Usually, this should be as simple as unzipping the latest release into the "wwwroot" folder, and marking it as an application with the IIS manager.
Once WebGit .NET has been deployed to your server, there are a few customizations that need to be made. First you need to set-up your repositories' path, next you need to point WebGit .NET at your installation of Git, and finally you may choose to add a custom post-create script, to be run after WebGit .NET creates a repository.
WebGit .NET uses a single folder as a repository store. By default, it is configured to be C:\Repos\Git
. This can, however, be changed. Edit the Web.config file to change the setting named RepositoriesPath
to point to your selected location. WebGit .NET will not create the folder at that path, so this must be an existing location.
msysgit installs the Git executable to the folder %programfiles%\Git\bin\git.exe
, which may vary from system to system. You need to locate the executable yourself, and change the Web.config setting named GitCommand
to point at the Git executable.
WebGit .NET will execute a shell script named post-create
located in the repositories' path upon successful creation of a new repository. You have the option of creating the aforementioned script, and customizing it to your liking. Some possible uses of this are: setting up your build server automatically, sending out an email to developers, commiting an initial set of files into the project, and so on.
Examples of these scripts may be available here eventually, but are currently outside the scope of this document.