git生成文件命令
# 配置用户名和邮箱
git config --global user.name "你的GitHub用户名"
git config --global user.email "你的GitHub邮箱"
# 生成ssh-key
ssh-keygen -t rsa -C "你的GitHub邮箱"
# 验证
ssh -T git@github .com
第一步:安装Git
https://git-scm.com/https://git-scm.com/
安装完Git后,我们要使用Git CMD程序生成SSH文件

第二步,在Git CMD控制台执行git命令

前三行命令依次执行,它会提示你
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\yongjie.liu/.ssh/id_rsa):
咱不管它,连续按回车,出现下面这个图片就证明成功了

到此秘钥文件已经生成

使用记事本打开秘钥文件

这一长串文本就是秘钥
第三步:去GitHub添加公钥


添加成功后就是上面图片的样子
第四步:验证是否通过

我这一次验证,居然失败了
