This article was transferred from: http://www.codeceo.com/article/windows-git-server.html
Git server setup under Windows platform
First step: download java,:http://www.java.com/zh_cn/
Step Two: install Java. The installation steps are no longer detailed.
Step Three: Configure the Java environment variables.
Right-click "Computer" + "Properties" + "Advanced system Settings" + "advanced" + "environment variables" = "System Variables".
- New:
Variable name: java_home
Variable Value: D:\Program Files (x86) \java\jdk1.6.0_21 "specifically according to your own installation path, my is installed on the D-drive"
2. NEW:
Variable name: CLASSPATH
Variable value:.; %java_home%/lib/dt.jar;%java_home%/lib/tools.jar
3. Add: Locate the path variable and select Edit. Add the%java_home%/bin;%java_home%/jre/bin to the end of the variable value.
Fourth Step: Verify that Java is installed successfully.
Open the Command window and enter cmd = = OK.
In the Command window, enter the Java command: Javac, enter, if the following information appears, the installation is successful.
Fifth step: download gitblit.:http://www.gitblit.com/
Sixth step: unzip the downloaded compressed package, without installation.
Seventh Step: Create a folder to store your data.
Eighth Step: Configure the Gitblit.properties file.
- Locate the Gitblit.properties file under the data file in the Git directory, and Notepad opens.
2. Locate the Git.repositoriesfolder (database path) and assign the seventh step to create a good file directory.
3. Locate the Server.httpport, set the port number of the HTTP protocol
4. Locate the Server.httpbindinterface and set the IP address of the server. Set up your server IP here.
5. Locate server.httpsbindinterface, set as localhost
6. Save and close the file.
nineth Step: Run the gitblit.cmd batch file.
- Locate the Gitblit.cmd file in the Bitblit directory, and double-click it.
2. The running result is as follows, the operation is successful.
Tenth step: Open in the browser, you can now use Gitblit.
11th Step: Set the Windows Service mode to start Gitblit.
- Under the Gitblit directory, locate the Installservice.cmd file.
2. Open with Notepad.
3. Modify ARCH
32-bit system: SET arch=x86
64-bit system: SET ARCH=AMD64
4. Add CD to program directory
SET cd=d:\git\gitblit-1.6.0 (your actual directory)
5. Modify the startup parameters in the Startparams, and empty it.
6. Save and close the file.
12th step: start Gitblit in Windows service mode.
1. Double-click the Installservice.cmd file (run as Administrator) in the Gitblit directory.
2. Under the service management of the server, you can see the existing Gitblit service.
3. When used normally, it is possible to keep the service up and running.
The above is the entire contents of the GITV server configured under the Windows platform.
It is important to note that the URL of gitblit is somewhat different from those of GitHub, in the format: Http://[email protected]:p ort/r/projectname.git, the clone URL for everyone on a team is not the same, Just enter the password when cloning or push, because username is already specified in the URL.
Git server setup under Windows platform