生成SSH秘钥文件

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添加公钥

添加成功后就是上面图片的样子

第四步:验证是否通过

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

相关推荐
会打莎士比亚的猴子12 小时前
VSCode使用Remote-SSH连接服务器时启动失败glibc不符合
ide·vscode·ssh
Htht1111 天前
【Github】之【Bug】一直无法连接github的ssh
ssh·github·bug
hillstream32 天前
vscode和cursor对ubuntu22.04的remote ssh和X-Windows的无密码登录
vscode·ubuntu·ssh
假如我年华正好3 天前
【教程】MacBook 安装 VSCode 并连接远程服务器
linux·服务器·ide·vscode·ssh·macbook
Misnearch3 天前
远程主机可能不符合glibc和libstdc++ VS Code服务器的先决条件
服务器·vscode·ssh
牛马大师兄3 天前
Shell脚本编程之正则表达式
linux·运维·服务器·开发语言·ssh·bash·shell
MarkHD4 天前
第八天 - paramiko/ssh模块 - 远程服务器管理 - 练习:批量服务器命令执行工具
运维·服务器·ssh
写代码的小王吧4 天前
【安全】Web渗透测试(全流程)_渗透测试学习流程图
linux·前端·网络·学习·安全·网络安全·ssh
源代码•宸4 天前
Visual Studio Code SSH 连接超时对策( keep SSH alive)
运维·服务器·ide·经验分享·vscode·ssh
fei_sun5 天前
获取ssh密钥
运维·ssh