Ssh Key生成和导入

Jun 30, 2021  

ssh-key生成并导入github的方法

  • 1、设置git用户名和邮箱

     git config --global user.name "yourusername"
     git config --global user.email "youremail"
    
  • 2、生成密钥

    ssh-keygen -t rsa -C "emailname@qq.com"
    
  • 3、添加SSH key到github账户

  • 4、测试SSH key是否设置成功

    ssh -T git@github.com
    
  • 5、更改.git/config文件为ssh形式