平台:Windows 打开git bash 随便在一个目录下右键,选择“Git Bash Here” 生成公钥命令 ssh-keygen -t rsa -C “your_email@example.com” 备注:your_email@example.com 为你在 GitHub或者GitLab 注册时的邮箱 在中间选择保存文件和覆盖时,直接按回车即可 查看生成的公钥 在/c/Users/worke/.ssh/目录下的id_rsa为私钥,id_rsa.pub为公钥