Please make sure you have the correct access rights and the repository exists.

  1. git config --global user.name “yourname”
  2. git config --global user.email“xxxxxxxxx.com"
  3. 除.ssh文件夾(直接搜索該文件夾)下的known_hosts(手動刪除即可,不需要git)
  4. $ ssh-keygen -t rsa -C "[email protected]"(請填你設置的郵箱地址)
  5. 出現:

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):

  1. 連續回車
  2. 然後系統會自動在.ssh文件夾下生成兩個文件,id_rsa和id_rsa.pub,打開id_rsa.pub,全部的內容複製
  3. 打開https://github.com/,添加ssh
  4. ssh -T [email protected]
  5. yes
  6. 關閉窗口,重新操作
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章