Configuring and installing Git under Windows (1)

Before starting this tutorial, you need to register an account on GitHub. Be sure to remember your email, username and password!

1. Download and install Git

The download address of Git installation package for each platform is: http://git-scm.com/downloads

Download the Windows version and install it on your computer.

How to start after installation: Enter Git in the start menu, find Git Bash, open the pop-up Git command window, and you can perform Git operations.

2. SSH key configuration of GitHub under Windows

1. Open Git Bash, enter the following command and press Enter:
ssh-keygen -t rsa -C "[email protected]"

2. Add SSH private key to ssh-agent

(1) Start ssh-agent in the background
eval $(ssh-agent -s)

(2) Add the SSH public key to the GitHub account
ssh-add /c/Users/Lcc/.ssh/id_rsa                                                                                                                     

(3) Add the SSH public key to the GitHub account 

  1. Copy the SSH public key: /C/Users/Lcc/.ssh/id_rsa.pub The complete content of this file
  2. Log in to your GitHub account and find Settings                                                                                                                                                                                 
  3. Find SSH and GPG keys in the left column and click Add                                                                                                                                                 
  4. Make a name and paste in what you copied earlier                                          
  5. Test: Open Git Bash Input:
    ssh -T [email protected]                                                                                                                                                                                                 Then type yes and press Enter.                    If your username is displayed in the prompt, the SSH key has been configured successfully.
    If it says "access denied", you can  read these instructions for diagnosing the issue .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325331367&siteId=291194637
Recommended