Git push/pull error: Could not read from remote repository

Published: by Creative Commons Licence

在 Git Bash 上使用 Git pull/push/clone 時發生

$ git push
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.

若已有將 SSH key 加進 Github 帳號裡面,再執行

$ eval $(ssh-agent)
Agent pid 14536

$ ssh-add ~/.ssh/github.com
Identity added: /c/Users/timchen/.ssh/github.com (timchen@IT-TimChen-N1)

ssh-add 請指定對應的 private key