Initial use of GitHub, and upload download files

Source: Internet
Author: User
Tags git clone

Use GitHub to sign up for GitHub's account and log in

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/98/04/wKiom1k2WQGwIQGJAADzMX7wEr4167.jpg-wh_500x0-wm_ 3-wmp_4-s_2344911410.jpg "title=" 1.jpg "alt=" Wkiom1k2wqgwiqgjaadzmx7wer4167.jpg-wh_50 "/>

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/98/04/wKiom1k2WSKjt14QAAFr3pkEVMU223.jpg-wh_500x0-wm_ 3-wmp_4-s_2036085085.jpg "title=" 2.jpg "alt=" Wkiom1k2wskjt14qaafr3pkevmu223.jpg-wh_50 "/>

Then start creating the project

Start a project

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/98/04/wKiom1k2Ww6R1BG1AABcjr8jNn8432.jpg-wh_500x0-wm_ 3-wmp_4-s_1942762159.jpg "title=" 3.jpg "alt=" Wkiom1k2ww6r1bg1aabcjr8jnn8432.jpg-wh_50 "/>

Create, start generating public private key, you can not have to lose the password every time

Ssh-keygen-t rsa-c "[email protected]"//fill in the email address, and then always "enter" OK

Then import the public key into the key in GitHub, that is, to import the id_rsa.pub, see:

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/98/06/wKioL1k2XEjTZ-N3AADQC8gtfgA681.jpg-wh_500x0-wm_ 3-wmp_4-s_1852866596.jpg "title=" 4.jpg "alt=" Wkiol1k2xejtz-n3aadqc8gtfga681.jpg-wh_50 "/>

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/98/06/wKioL1k2XI2gbj8qAACNQtxPIY4676.jpg-wh_500x0-wm_ 3-wmp_4-s_1200748857.jpg "title=" 5.jpg "alt=" Wkiol1k2xi2gbj8qaacnqtxpiy4676.jpg-wh_50 "/>

Finished adding key

Since I have multiple public private keys here, I also need to make changes to the local public key

A system must have more than one public private key as long as the configuration file config is added under. ssh. Edit the host and file on the inside

Such as:

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/98/06/wKioL1k2XaqjXh01AAAsjx9SeZ0174.jpg-wh_500x0-wm_ 3-wmp_4-s_811135192.jpg "title=" 6.jpg "alt=" Wkiol1k2xaqjxh01aaasjx9sez0174.jpg-wh_50 "/>

Remember, the permissions for the SSH folder are 700.

and. ssh/all file permissions are 600 that's all you need to say.

After the above configuration, your git should be able to ssh to the GitHub server, you can test a (after configuring SSH key, the local can operate the library under the user, can submit code):

ssh-t [Email Protected]hi mghxy123/device-check-script! You've successfully authenticated, but GitHub does not provide shell access.

When you have this hint, it means the connection is successful.

Let's start by creating a git library and download the empty library.

git clone ssh://[email protected]/mghxy123/device-check-script.git

The library is created.

Start uploading files

CD device-check-scriptcp. /new_file./git Add new_filegit commit-m "new file" git push//If there are other branches, you need to fill out the cleanup. Default is Master

OK upload successfully, we can go to our own Git library to find their own code

To the end of this experiment

This article is from the "Forand" blog, make sure to keep this source http://853056088.blog.51cto.com/12966870/1932830

Initial use of GitHub, and upload download files

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.