Source: Internet
Author: User
Tags hosting how to use git using git git commands

Mailbox settings

All git instructions are based on the user's mailbox to identify the user, so before running whatever git command. What are the user mailboxes that we should set for all git instructions?

1. Tell GitHub to make sure your mailbox is private and not public.

Log on to GitHub. Go to Home, click Setting options

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "width=" "height=" >

Go to the Email Settings page. Selected

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "width=" height= "260" >

2. Tell GitHub your e-mail address

First, you can verify what your email address is at the moment.

Open a command form. Input such as the following command

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "width=" "height=" >

Set up your own e-mail address. format is [email protected]

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /center "width=" "height=" >

SSH security verification 1. Creating SSH

Uploading the code to GitHub requires authorization. We must authorize the use of the current user of the computer. Have access to your GitHub account. GitHub uses SSH for authorization. That means we need a private key and a public key. So how do we do it?

Open terminal, enter the command in. Note Replace the email address for the email address you just set up

And then. The terminal will prompt "Do you want to use the default location to store SSH keys?" ", you press the ENTER key directly to indicate the use of the default path

Then, prompt to set the security password, can set any one password

2. Join the SSH private key to Ssh-agent

After getting to SSH key. We need to add its private key to the ssh-agent.

First, you need to make sure that ssh-agent is available.

Then, add the private key of the SSH key you just generated to ssh-agent, and note that "~/.ssh/id_rsa" indicates where the private key of SSH key is stored. This is a default location, assuming that you are producing SSH key in the previous step. Without changing the default location. Just use "~/.ssh/id_rsa" directly.

3.github Join Public Key

Following the steps above, we created SSH key and added the private key to the ssh-agent. Next. We need to tell GitHub about the public key.

Copies the contents of the face in the public key file to the Clipboard. Note that the "~/.ssh/id_rsa.pub" is the default path to the public key, assuming that the SSH key is being produced without changing the path and being able to use it directly

Then, open the homepage of GitHub and go to the setting->>ssh and GPG keys page. Create a new SSH key and copy the contents of the Clipboard into the key text box

Warehousing creation

After the authorization is successful. We are able to create warehouses. Then upload the code into the warehouse.

Create a warehouse.

Go to Home, click New Repositorybutton

Enter the name of the repository

Warehousing was created successfully. Note that the line is the address of the remote Storage. We need to use it later.

Uploading items to GitHub

A remote Storage was created on GitHub just now. Before we upload the project code to Remote Storage. We need to clone the Remote Storage locally. The address is the address where you just created the warehouse. Where are the cloned storage locations stored locally? is the location where the current command is running. We are able to view the current working folder by entering the command PWD in the terminal

Then, put you on the project to upload to GitHub (note. Delete the git file that comes with your project. Otherwise there is a conflict). After the copy is successful, enter the following command at the terminal to enter the local managed folder (just the storage location of the local storage cloned from remote Storage).

Add the modified place to the version number Manager

Submit to the local version number control Library, which is your description of this submission.

Submit your local repository to your GitHub account

Go back to GitHub with all the above steps and you'll be able to see that the project has been uploaded successfully


Keeping your email address private

Generating a new SSH key and adding it to the ssh-agent

Adding a new SSH key to your GitHub account

Teach you the simplest open source project hosting GitHub Novice Tutorials

Read the full text of the copyright notice: This article for Bo Master original article, without Bo Master agreed not to reprint. Report
    • Label:
    • Upload Item /
    • GitHub /
    • This article has been included in the following column:
1Article comments
Related articles recommended
Amoy Mall Series--Single sign-on user registration first, let's look at the instructions for the user's manual interface in the single sign-on interface documentation, for example, as seen.

The request method is the post type, the URL for us to understand the designation is OK, the number of the participation has four. Need to check the legality before submitting. The above interface documentation is clearly written. Everyone...

  • Yerenyuan_pku
  • 2017-06-13 22:08
  • 728
How people who have just started to learn how to upload their own projects on GitHub how to upload their own project on GitHub I am a small white github, the time to register account is not too short. But it's always been a family of divers.

The weather in Beijing these days is OK, that day. cloudless, small white walk in the road suddenly feeling time flies, no effort on ...

  • u013884068
  • 2016-03-01 10:25
  • 8887
How to use git to upload project code to a GitHub account and create a warehouse the first step to using GitHub is, of course, a GitHub account. After that you can create a warehouse (free users can only build public warehouses), create a New Repository, fill out the name after creat ...
  • Laozitianxia
  • 2016-02-17 18:24
  • 29723
git learning-upload project code to GitHub 1. Register your account and create a warehouse???? The first step to using GitHub is, of course, a GitHub account.

You can then create a warehouse (free users can only build a public warehouse), create a New Repository. Fill in the name after C ...

  • Luckyyulin
  • 2014-03-12 14:49
  • 76641
Git usage-How to upload a local project to GitHub very early on GitHub, but it has been mengmengdongdong and very unskilled in its use. Until yesterday, finish the task of Baidu Front-end Technical college. When I tried to host the code on GitHub, I found that I was so dumb about git that I decided to make git a good one today ...
  • Zamamiro
  • 2017-04-14 15:35
  • 2756
teach you to upload your local code to GitHub to get to the point, recently someone in the group asked how to upload the newly created local code to GitHub, here is a simple record. I like to use the command line, which is all done in the command line, do not understand the git command to understand.
  • hanhailong726188
  • 2015-07-03 10:47
  • 63874
How do I upload a locally written project to GitHub? If the local project is called MyProject1. First build a repository on GitHub's account myname. If the name is MyShare2. Generate local ssh key$ ssh-keygen-t ...
  • Frivol
  • 2015-04-17 23:09
  • 3272
How to upload a project from the local to GitHub first create an account on GitHub, because the transfer between the local git repository and the GitHub repository is encrypted via SSH, so a private key and a key command are generated locally. Follow the mailbox, with your own $ ssh-keygen-...
  • Deng0zhaotai
  • 2014-08-22 20:20
  • 5883
Uploading a local project to GitHub hosting using git commands (1) First create a new repository on GitHub and I'll name newsclient. Other according to their own needs to fill out can: (2) After the creation, you can see this.

。。 3) Notice the project URL in the lower right corner ...

  • kongying19910218
  • 2016-01-14 11:02
  • 1291
How to upload local code to github like classmates can look at the original text, speak more specific OH original address: http://www.cnblogs.com/cxk1995/p/5800196.html First you need a GitHub account , not all of them ...
  • qq_32846595
  • 2017-05-03 20:02
  • 238
static flow depth + attention
    • Mac system installation Openfireserver configuration
    • mac system installation MySQL database
    • Write shell commands to implement iOS ' own active packaging
many other articles Online Courses
"Live" machine learning & Data Mining 7 weeks training--Wei Chi

Utm_source=blog7 "target=" _blank ">" Package "System integration project manager Smooth customs clearance--Xu Bong

  • folder
  • like to cancel like
  • Collection
  • share Weibo QQ
Collection Assistant Bad news report

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.