linux github upload configuration+git

git upload configuration


Need to download git and configure git account first

Open the terminal:

sudo apt install git

Then configure the account:

  git config --global user.name "github的用户名"
  git config --global user.email "github的邮箱"

(1) Go to github to create your own account

  • ​ https://github.com/ Follow the prompts to register an account
  • Create your own engineering project

Insert picture description here

Create your own project name and overview, click on Creat repository

Insert picture description here

(2) Obtain the ssh key of the machine

Find a folder and open the terminal and enter the command:

 ssh-keygen -t rsa -C [email protected]

E.g:

 ssh-keygen -t rsa -C [email protected]

Insert picture description here
This picture comes from another website

The content shown in this figure appears and then it is fine.
Will generate a .ssh file in the current directory (this file is a hidden file)

Insert picture description here

Insert picture description here

(3) github configuration ssh

Click the setting of the github homepage picture.
Insert picture description here

Insert picture description here
Then click the SSH and GPGkeys button.

Write Title (named yourself) and Key

The Key here is the ssh key created with the command before,
open the .ssh fileInsert picture description here

Copy the contents (all) to the Key option. If the github homepage does not display an error, the operation has been completedInsert picture description here

Guess you like

Origin blog.csdn.net/Msyusheng/article/details/114290409