View SSH Key settings on Ubuntu and add settings on GitHub

Here is how to view SSH key in Ubuntu settings and add settings on GitHub

Sometimes git clone may have an error:
Insert picture description here

This requires us to view the SSH key in the Ubuntu settings and add the settings on GitHub

1. Type on the terminal

ssh-keygen

Will pop out
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/emmap1/.ssh/id_rsa):
Press Enter or Return to accept the default location.

2. Enter and re-enter the password when prompted.
This command uses its public and private keys to create a default identity. The entire interaction process will be similar to the following
Insert picture description here
3. List ~/.ssh to view the contents of the key file

ls ~/.ssh

Insert picture description here
This command displays two files, one for the public key (for example id_rsa.pub) and one for the private key (for example id_rsa)

4. View the key
Press control+h in the main file to view the hidden folder, and find
Insert picture description here
the shared key
Insert picture description here
in id_rsa.pub 5. Add the key on
GitHub GitHub URL: https://github.com/
after logging in to GitHub Click the avatar in the upper right corner, click Your profile,
Insert picture description here
click Edit profile,
Insert picture description here
click SSH and GPG keys on the left, then set New SSH key, set the name of the key yourself, and copy the key in id_rsa.pub and add it.
Insert picture description here
After adding it, it looks like so
Insert picture description here
then you can download the smooth

Guess you like

Origin blog.csdn.net/qq_45067735/article/details/108027310