1. 生成 ssh 密钥
ssh-keygen -t rsa -C "xxxx@xxx.com"
有提示就一路回车
2. 查看 ssh 服务是否在运行
Get-Service ssh-agent
若出现:unable to start ssh-agent service, error :1058
以管理员方式启动你的终端,输入如下命令
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
3. 在 C:\Users\你的用户名.ssh 路径中找到 ssh 公钥
用记事本打开并复制内容
4. 在 GitHub 设置中添加公钥
粘贴公钥内容