.ssh目录
windows下一般为:C:\Users\15237\.ssh ,其中“15237”为当前登录用户
生成新的ssh
.ssh目录下打开“Git Bash Here”(如果没有,先安装 Git 软件)
执行命令:
ssh-keygen -t rsa -C "your_email_adress" -f id_rsa_github2 -C "Github2"
例如:
ssh-keygen -t rsa -C "huadongyuan@yongjia" -f codeup_hdy_id_rsa -C "CodeUpHdy"
“your_email_adress” 替换成你的邮箱账号, -f id_rsa_github2 文件名,可以自定义,默认为 id_rsa ,-C “Github2” 为描述信息
生成期间会要求输入两次密码,不用输入,直接回车。
配置
.ssh目录下找到 config 文件,如果没有,请创建一个(注意,无文件扩展后缀)