GitHub upload and download

Source: Internet
Author: User

1. Create SSH key

First time using GitHub, first create the SSH key locally

ssh-keygen-t-C"[email protected]"  

The following [email protected] changed to your mailbox, then asked to confirm the path and enter the password, we use the default all the way to the line.

Successful words will be generated under ~/. SSH folder, go in, open id_rsa.pub, copy the key inside.

Go back to GitHub, go to account Settings, choose SSH keys,add ssh key,title on the left, and paste the Key. Similar to:

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA63rye64sOsj3wINkbDKcnEC78bG/Bg0DBS5Q6TZaEglIHTAhszWu/meFuUiUHGpKSzVc29DHeqaM7Jvad3zhcaceu5Bl1OFT7devC0Q3s5k+MYwdIwc/OiiF9MBia5iXxS6N2i7NSEoXjFiS2EcpXPmhn/pljxCIzOhJy2OB3i6VBJJBFYb2BL03/ozOqnI3hKk3o8hpop28UkzKr4f+ObPZDAyI9riXhbu5nnZDqQSzlwv3NDoZOOWm9t8NcEUIeMSSB5+FGY64CPGE85GUop1+2QcVpRBMd2CU3R4NtFllFYwnf9f3uGoXG6IBPBP2EO3KBGXaHj0v83rpqbt+2w== cdkd321@126.com

In order to verify success, enter it under GIT bash:

ssh -T git@github.com  

If this is the first time you are prompted for continue, enter Yes to see:

shell

This means that you have successfully connected to GitHub.

Upload
//or  create  a  new  Repository on  the  Span class= "Hljs-title" >command  line   Echo # command >> readme.md  git initgit add  Readme.mdgit commit-m  "first commit"  git remote add  origin [Email protected]:xiabodan/command . git   Git push-u origin master  
//oranfromthecommand lineadd origin [email protected]:xiabodan/command.gitgit push -u origin master
Download

First time Download

clone https://github.com/xiabodan/DataStructure.git

Update code

git pull

GitHub upload and download

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.