注册GitHub账号
下载安装Git 客户端
打开Git Bash
输入如下命令,并按回车
$ git config --global user.name "github用户名"
$ git config --global user.email "github邮箱"
$ ssh-keygen -t rsa -C "github邮箱" //生成ssh key]
一直按回车,直到出现如下key’s randomart image
1、打开对应目录下的id_rsa.pub(打开记事本直接拖入),全文复制
2、打开网页github,现则settings / ssh and GPG keys
点击 new ssh keys
title :随便起
key:将刚刚从id_rsa.pub 复制得内容完全粘贴
3 、测试 Git 是否连接成功 Github
推荐阅读: https://stormsha.com/article/2022/