Preparatory work:
1, Git-1.9.4-preview20140611.exe
2, Copssh_5.0.0_free_installer.exe
3, Tortoisegit 1.8.12.0-64-bit. msi
Server systems: Windows 7
Client systems: Windows 7
Server-side installation and deployment
1. Install git
Complete the installation
2. Installing SSH and configuring users
After installation, add the user via "Copssh Control Panel".
Add an Administrator account setting password in the System control Panel
Start configuring the SSH user
With the Users tab selected, click the Add button to add the user
Next Doman for computer name (view in computer properties)
Select the user name that you just created, as an admin account, select the user point keys, add and save the public key
The contents of the box are, user name, computer name, password save address
There are two more actions to complete after installation:
1, the GIT installation directory Git\libexec\git-core folder Git.exe, Git-receive-pack.exe and Git-upload-archive.exe, Git-upload-pack.exe These 4 files are copied to SSH under the installation path Icw\bin.
2. Copy the git installation directory Git\bin\libiconv-2.dll to Icw\bin.
3. Connect to Git repository
CMD into the Icw\bi folder in the SSH installation directory, call the Ssh.exe file and enter the following code: SSH username @ machine name or IP address
Type Yes
Enter password
See last login, which represents a successful connection. At this point you are connected to git via the SSH protocol.
4, build the library operation
After the login is complete, the actual path at this time is the icw\home\ user name
Open git bash in the directory;
To build the library, proceed as follows:
mkdir testgit//Create Testgit folder
CD testgit//Enter Testgit folder
GIT init//repository initialization, will create a new library with Testgit for the library name
Touch First.txt second.txt//Create First.txt and Second.txt text documents
git Add. Add a file to Git
git config–global user.email "[email protected]"//Set Email address
git config–global user.name "Your name"//Set user name
Git commit–m "init"//Commit changes to Git
Note: Git defaults to the clone version after modifying the master version of the information can not submit changes, such as the need to open permissions, to modify the. git/config file after adding the following code:
[Receive] Denycurrentbranch = Ignore
CD ICW/HOME/MAYGIT/.SSH//Enter the. SSH folder
Ssh-keygen–t rsa–c "[email protected]"//Generate public key, default name is Id_rsa
Enter the file name first, and then enter the password two times, at this point, the server side of the installation and configuration is complete.
Client Configuration:
Download Tortoisegit, Installation complete
To create a new folder, right-click the git clone option, the dialog will pop up, enter the correct URL, select the Web, choose a local folder, and tap OK.
Windows Git Server Setup