Environment: Windows 10 Professional Edition 32-bit
Because the company server has been built on visual svn, and so on, have to build a git server on Windows for everyone to use.
Reference Link: http://www.cnblogs.com/ucos/p/3924720.html (hereinafter referred to as Link a)
Http://www.cnblogs.com/lwme/archive/2012/12/25/configuring-git-server-and-client-on-windows.html (hereinafter referred to as Link B)
Originally wanted to use the Copssh+msysgit+putty solution mentioned in a, feeling configuration is too troublesome. So I tried the gitblit mentioned in B.
- Download install Java, or JDK. Oddly enough, I entered Javac in cmd and prompted Javac not an internal or external command. But in cmd the Java command is possible. At the same time Http://java.com/verify has verified that Java has been installed. I'm not in control, go on with the next step.
A few:
The JDK and JRE are installed in the same directory.
Environment variable: java_home
Environment variable: CLASSPATH
Environment variables: Path
Java environment variable configuration online A lot of tutorials, I do not specifically write here, please refer to link a.
My javac command is invalid, but the Java command is valid.
- Download Gitblit (I use this version is 1.7.1), unzip, link A is said to be the editor gitblit.properties file, but my side found is to edit Defaults.properties file.
Git.repositoriesfolder = D:\Git\GitRepository
Server.httpport = 10101
Server.httpbindinterface = 192.168.1.199
Server.httpsbindinterface = localhost
Save.
Related:
Double-click Run Gitblit.cmd
Then you can access the http://192.168.1.199:10101/on the LAN with a browser.
A test Repository was built.
Surprisingly, it supports Sourcetree.
- Set the Windows Service mode to start Gitblit.
Modify the Installservice.cmd file.
1) Modify ARCH
32-bit system: SET arch=x86
64-bit system: SET ARCH=AMD64
2)
Add CD to program directory
SET cd=d:\git\gitblit-1.7.1 (your actual directory)
3)
Modify the startup parameters in the Startparams, and empty it.
4) After saving right-click Installservice.cmd, run as administrator.
Can be seen in the service of the system gitblit, usually used, to keep this service is the start state on it.
Git server setup under Windows platform