Git 生成 SSH key
Generating a new SSH key pair
进入目录c/Users/Administrator/.ssh文件夹
ssh key 存放在 id_rsa 和 id_rsa.pub 下
如果没有.ssh文件
$ cd ~/.ssh
如果报错:$ bash: cd: /c/Users/Administrator/.ssh: No such file or directory
出现以上问题,原因:在windows7下安装git后没有ssh
解决方案:
$ ssh-keygen -t rsa -C "user@email.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/\Administrator/.ssh/id_rsa):##然后敲回车##
Created directory '/c/Users/\Administrator/.ssh'.
Enter passphrase (empty for no passphrase):##然后敲回车##
Enter same passphrase again:##然后敲回车##
此时你的 c/Users/\Administrator/.ssh 目录下生成了 id_rsa 和 id_rsa.pub 两个文件