Preparatory work:
1, Git-1.8.1.2-preview20130201.exe
:
Https://code.google.com/p/msysgit/downloads/list
2, Copssh_4.1.0_installer.exe
:
http://download.csdn.net/download/zzjzmdx/4636227
3, Tortoisegit-1.8.5.0-64bit.msi
:
https://code.google.com/p/tortoisegit/wiki/Download?tm=2
Server System: Windows Server 2003 SP2
Client system: Windows 7 SP1
Server-side installation and deployment
1. Install git
Choose a default installation here
Choose the third one here, not to convert to UNIX code style
Complete the installation
2. Installing SSH and configuring users
Install in the root directory, avoid spaces in the path, causing unnecessary trouble
Here is the password to set up SSH account
Prompt to add user via "Copssh Control Panel" after installation
Complete the installation
Start configuring the SSH user
With the Users tab selected, click the Add button to add the user
Select the user name, where you can select the "svccopssh" user that was set up when you just installed SSH, or you can create a new user for yourself, this tutorial creates a new Gitadmin user as an administrative account.
There are two more actions to complete after installation:
1, the Git installation directory D:\Program Files\git\libexec\git-core folder Git-upload-pack.exe, Git.exe, Git-receive-pack.exe and Git-upload-archive.exe These 4 files are copied to the installation path of SSH under D:\ICW\bin.
2. Copy the Git installation directory D:\Program Files\git\bin\libiconv-2.dll to D:\ICW\bin.
3. Connect to Git repository
Go to the Bin folder in the SSH installation directory, call the Ssh.exe file, and enter the following code:
"SSH [email protected] Your server name or IP address"
Type Yes
Enter password
See this interface to represent a successful connection. At this point you are connected to git via the SSH protocol.
4, build the library operation
When the login is complete, the actual path at this time is D:\ICW\home\GitAdmin
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
CD ~/.SSH//Enter the. SSH folder
Ssh-keygen–t rsa–c "[email protected]"//Generate public key, default name is Id_rsa
At this point, the server-side installation and configuration is complete.
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
Client Installation and Configuration
1. Install git
The installation steps are the same as the server side.
2, Installation Tortoisegit
Installation Complete
At this point in your computer right mouse button can see git has been integrated into the system shortcut operation.
3, Configuration Tortoisegit
First, set the value of SSH client in tortoisegit>settings>network to "D:\Program Files (x86) \git\bin\ssh.exe".
To create a new test local folder, right-click the git clone option, the dialog will pop up, enter the correct URL, select the Web, choose the local folder, and tap OK.
If the URL is correct, the input password interface will pop up and the library information will be cloned locally when it is entered correctly.
See success, congratulations, you have obtained the library information on the server.
Windows+git+tortoisegit+copssh Installation Text Tutorial reprint