Download github code using commands under Windows

Source: Internet
Author: User

GitHub This is not introduced, under the words of Linux is very convenient, install git and ssh can be directly down, but in windows above, the problem comes, say how to lower the source code bar, install Cygwin, when installing Cygwin, Choose Git and OpenSSH to install, installation methods and steps do not speak, a bunch of online, focus on, how to code

The GIT connection requires a publickey, so we need to build a PublicKey first (the following commands are required to enter in Cygwin)

1 Detect if SSH key is already in existence

Ls-la ~/.ssh

Check to see if there are id_rsa.pub and id_dsa.pub in the list shown, and if not, go to step 2nd, or skip to step 3rd

2 Generate a new SSH key

" [email protected] "  

The following is the registration of GitHub to fill out the email, such as: ssh-keygen-t rsa-c [email protected]; After entering the complete command, the carriage return needs to enter something, the default carriage return is the line, and finally the following string appears, that is, the build succeeds

The key fingerprint is:2c:4d:14:04:89:8f:91:a2:a3:ed:5e:as:6d:2e:6d:0f [email protected]the key ' s randomart image is:+- -[RSA 2048]----+| O. || O + O | | . + . + . || . + . . . || O. . S. || Oeo | | +oo. O. || ..... O.. ||. . o |+-----------------+

3 Add the generated key to GitHub

After logging in, enter this address: https://github.com/settings/ssh

The/home/xxx/.ssh/id_rsa.pub just generated this file open, copy all the contents, add to Ssh-keys, save;

4 Verifying that a successful connection is possible

ssh-t [email protected]
The authenticity of host'github.com (207.97.227.239)'Can't be established.# RSA Key Fingerprint is  -: -: Ac:a5: the: -: 2d: $: the: 1b: About: 4d:eb:df:a6: -. # is you sure-want toContinueConnecting (yes/no)?Don'T worry! This was supposed to happen. Verify that the fingerprint in your terminal matches the one we've provided up above, and then type"Yes."# Hi Username! You've successfully authenticated, but GitHub does not# Provide shell access.

Show that these instructions have been connected successfully; Here is the clone code, which is simple:

git clone xxxx is followed by the address to the next code, OK, on GitHub up and down the code to the end of the Jane, do not know that there is no written clearly;

Reference: Https://help.github.com/articles/generating-ssh-keys

Download github code using commands under Windows

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.