從遠程庫github.com克隆程式碼時遇到了如下的問題:
Warning: Permanently added the RSA host key for IP address ‘13.250.177.223’ to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
這個應該是很多github新手經常出錯的問題,這個就是沒有在你github上添加一個公鑰
1.可以用: ssh-keygen -t rsa -C “GitHub帳號” ,一直Enter下去生成公鑰如下所示
2..然後用:cat+公鑰路徑,把出現的key複製下來
3.在 github 上添加剛剛生成的公鑰