Build git for Windows Server (100% can succeed) "Go"

Source: Internet
Author: User
Tags ssh server git clone

Transferred from: http://blog.csdn.net/code_style/article/details/38764203

Since git works very well under Linux, why build a server for git windows, because not all users need to develop under Linux, right, and many users choose to use Windows for development.

See a lot of users try to partially unsuccessful, so the content of the section has been modified.

Date: 2015.10.14

Popular Science:

1. What is Tortoisegit? Yes, it is a turtle, like its shell, just a shell, so inseparable from the real git (git for Windows version name is called Msysgit, Shell Turtle can also be called turtle?) Foreign goods are like to name the open source project as some strange things.

2, Copssh What is a thing? is an SSH server on a Windows platform.

3, Git-1.8.3-preview20130601.exe What is a thing? This is the real git.

4. Why do I need to convert the key pair (public and private key) generated by the Putty key Gen that comes with Tortoisegit? Copssh doesn't have to generate any key at all, just add the public key provided by the client.

Refer to this man's method: http://blog.csdn.net/aaron_luchen/article/details/10498181, basically can succeed 90%, but eventually there will be such a mistake,

Like what:

Disconnected:no Supported authentication methods available (server sent:publickey,keyboard-interactive)

For example, use Git clone how to clone not down code and so on.

Like what:

Fatal:protocol Error:bad Line Length CHARACTER:MICR

For such protocol errors, you should choose the Linux shell and SFTP and should not choose Windows shell.

Start to get to the chase:

So take note of the following steps.

1, add the user later, in Copssh pannel inside add good for Windows created users, such as the name of git, bullish password authentication but not checked.

2, focus on this step, modify the configuration file, find Copssh installed directory under the ETC directory, such as C:\SSH\ETC, with Notepad open Ssh_config and sshd_config These two files, two files are to be modified.

Modify the following content:

Find Passwordauthentication, if there is a # number in front, delete it, if it is yes, change to No

Passwordauthentication No

Find Pubkeyauthentication, if there is a # number in front, delete it, if it is no, change it to Yes

Pubkeyauthentication Yes

Locate Port 22 and remove the previous # number

Port 22

3, see, at a glance, do not tell me you do not know where this software opened from, since the installation of the Turtle Tortoisegit, of course, is to go to its start menu inside to find. Save the private key for load when synchronizing later.

4, open the COPSSH installation directory under the HOME\GIT\.SSH directory, open Authorized_keys file, will just previous step generated public key, paste in, point save, exit. For example:

5, restart the Copssh, the method of two,

One is the point green button, turn red, the point can be green again, green represents the normal operation, the prompt service is running, if there is a problem with the configuration, sometimes appear, you click on the red button, the program without any hint directly closed, I have to scold the developer of this software here, it's a stupid one. Even if the program is wrong, a MessageBox to prompt users will die? But directly to the return, really wonderful.

Another is to enter the Windows service inside, double-click OpenSSH SSHD, click Start Service, if the following situation occurs, the workaround is:

5.5, the description copssh operation Normal:

6, synchronous code, if the server has created a version of the library, how to use the Turtle software Tortoisegit synchronization down, if the synchronization address is such (LAN): Ssh://[email protected]:22/ssh/home/git/lib_ Database

Synchronization succeeded:

Postscript:

Some people say to change the place below, really do not know how to think, change will cause git clone when the load Putty key becomes gray, resulting in the client can not select the PRIVATEKEY.PPK private key file.

After comments repeatedly, "Git did not exit cleanly (exit code 128)" Error prompt, generally due to the permissions between the local and server issues, try to start, run->\\192.168.10.8 Enter, See if you can show the user name and Password window, not, then there is a problem between the permissions, the first to solve the problem, should be able to pass the later.

Build git for Windows Server (100% can succeed) "Go"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.