Secure Shell (SSH)

“This is the 18th day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021”

Git installation

Official website to download

Default options will work if there are no special requirements for the installation process

Configure the global user name and mailbox

  1. Open the git bash here command-line interface and run the following command
  • The Git commit code does not allow anonymous commit and requires the username and mailbox to be configured, although the Git function does not use these two parameters
  • User.name, user.email is to tell others who made your submission (name) and how to contact them (email).
  • User. name, user.email and GitHub and Gitlab accounts can be inconsistent, similar to nicknames
  1. Configuring global Names
git config --global user.name "xxx"
Copy the code
  1. Configuring the Global Mailbox
git config --global user.email "[email protected]"
Copy the code

Attention!! If you have previously set the project email address and user name, perform the preceding steps to set the global email address and user name, which will overwrite the previous Settings. You need to set the user name and email address separately for the project

Project level username and mailbox

To configure the mailbox and user name for the project, type the following command in the root directory of the project:

git config user.name yourname
git config user.email yourname@163.com
Copy the code

Generating a key public key

Run the following command all the way to the line, the generated file is stored

 ssh-keygen -t rsa
Copy the code

To view the public key, go to c :\Users\ username.ssh in drive C

cat ~/.ssh/id_rsa.pub
Copy the code

GitHub adds a key

Copy the id_rsa.pub content to the GitHub configuration.

The idea of configuration git

Idea Configures git programs

Configure the Github account

GitHub must be authorized to IDEA

SSH Download test

Git Command Download

 git clone [email protected]:xxx/java8.git
Copy the code

Use the command line to download the SSH project link and reply yes for the first clone, which will generate 2 files in C:\Users\ username.ssh

  • known_hosts
  • known_hosts.old

Download the GUI

Git >> Clone