Github upload and download, github upload and download

Source: Internet
Author: User

Github upload and download, github upload and download
1. Create an SSH key

When using github for the first time, create an ssh key locally

ssh-keygen -t rsa -C "your_email@youremail.com"  

After the your_email@youremail.com is changed to your mailbox, will ask to confirm the path and enter the password, we use the default one-way carriage return on the line.

If it succeeds ~ /, Generate the. ssh folder, go in, open id_rsa.pub, and copy the key.

Go back to github, go to Account Settings, select SSH Keys on the left, Add SSH Key, enter the title, and paste the key. Similar:

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

In git bash, enter:

ssh -T git@github.com  

If this is the first time, a message indicating whether to continue is displayed. Enter yes and you will see:

You’ve successfully authenticated, but GitHub doesnot provide shell access 

This indicates that github has been successfully connected.

Upload
//or create a new repository on the command lineecho # command >> README.mdgit initgit add README.mdgit commit -m "first commit"git remote add origin git@github.com:xiabodan/command.gitgit push -u origin master
//or push an existing repository from the command linegit remote add origin git@github.com:xiabodan/command.gitgit push -u origin master
Download

First download

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

Update code

git pull

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.