天天看點

git提示:The authenticity of host ‘github.com (13.229.188.59)‘ can‘t be established.

問題

本地的git拉取github遠端倉庫到本地報錯資訊如下:

git提示:The authenticity of host ‘github.com (13.229.188.59)‘ can‘t be established.

解決

git config --global user.email 你的郵箱
git      

1、輸入​

​ls -al ~/.ssh​

git提示:The authenticity of host ‘github.com (13.229.188.59)‘ can‘t be established.

2、輸入​

​ssh-keygen -t rsa -C "自己的github賬号"​

​,然後回車3次

  • key生成成功後使用者主目錄生成.ssh檔案夾。
  • id_rsa是私鑰,id_rsa.pub是公鑰。
  • git提示:The authenticity of host ‘github.com (13.229.188.59)‘ can‘t be established.
  • 3、檢視ssh-key:​

    ​cat ~/.ssh/id_rsa.pub​

  • git提示:The authenticity of host ‘github.com (13.229.188.59)‘ can‘t be established.
  • 4、複制ssh-key到github上的,秘鑰資訊以​

    ​ssh-rsa​

    ​開始,郵箱結束的
  • 登入github,找到Settings=>SSH and GPG keys設定。
  • 點選New SSH key,Title輸入框随意,Key輸入框填入公鑰的内容
  • git提示:The authenticity of host ‘github.com (13.229.188.59)‘ can‘t be established.
    git提示:The authenticity of host ‘github.com (13.229.188.59)‘ can‘t be established.
  • 5、測試是否成功:​

    ​ssh -T [email protected]

git提示:The authenticity of host ‘github.com (13.229.188.59)‘ can‘t be established.