生成SSHkey并绑定到GitHub
Open Git Bash.
生成SSH key文件
$ ssh-keygen -t rsa -b 4096 -C "wwwlibaoshan12@163.com" 
#.ssh文件保存在默认路径下,注意从上述命令的输出中,查看。 
[本人路径保存在C:\Users\wwwli\.ssh]
查看存在的SSH Keys
$ ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist 
添加SSH key添加到ssh-agent
#确认ssh-agent正在运行 
$ eval $(ssh-agent -s)
Agent pid 28148 
#添加SSH key私钥到ssh-agent 
$ ssh-add ~/.ssh/id_rsa 
Identity added: /c/Users/wwwli/.ssh/id_rsa (/c/Users/wwwli/.ssh/id_rsa) 
添加SSH key到git账户
#将公钥复制到剪切板上 
$ clip < ~/.ssh/id_rsa.pub 
#这是你的剪切板上已经有公钥了 
GitHub账号绑定公钥

再依次单击|”SSH and GPG keys”|,|“New SSH key” |, 
输入|“Title”|,在key处粘贴上述剪切板的内容。 
单击“添加SSH key”
                    
                
                
            
        
浙公网安备 33010602011771号