- 開発環境:macbookpro, terminal
ローカルからGithubにPushした際に出たエラー
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
id_rsaを更新する
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
$ pbcopy < ~/.ssh/id_rsa.pub
これでクリップボードにコピーされているので、
Githubの
Settings -> SSH and GPG Keys へ進み緑のボタンから追加。
pbcopy
とするとcat
して選択してコピーする手間が省ける。
参考:Permission denied (publickey). fatal: Could not read from remote repository. #23