windows Github添加SSH key

#安裝git並配置環境變量 #給Github添加SSH keygit

  1. ssh-keygen -t rsa -C "mail@mail.com" 若是遇到:C:\Users\XXXX> Saving the key failed: //.ssh/id_rsa. 解決方式是添加HOME環境變量:C:\Users\XXXX
  2. 打開id_rsa.pub 將裏面的內容拷貝到github setting 中的 SSH and GPG keys New SSH key
  3. 驗證 ssh -T git@github.com yes 若是出現Hi xxx 就OK了 4.設置用戶信息 git config --global user.name "name" git config --global user.email "mail" 5.出現Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts. 在hosts中添加192.30.252.131 github.com
相關文章
相關標籤/搜索