GitHubを久々に使ったらエラーが出た話
掲題の通り
半年ぶりくらいにプロジェクト作ってpushしようとしたら以下のエラーが出た。
Warning: Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
やったことその1
githubの、Setting->SSH keys にて、鍵が停止されてる気配があったので、Approve ボタン押下
したんだけど、治らなかった。
治る場合もあるもよう。memo
Github.comへのgit cloneでsshの認証がエラーになった
やったことその2
公開鍵の登録し直し
ホームで $ ls ~/.ssh
で確認して id_rsa
と id_rsa.pub
がちゃんと存在してたので
$ pbcopy < ~/.ssh/id_rsa.pub
で内容をクリップボードにコピーして、
SSH Keysの設定ページで新しいKeyとして追加する。
治った。
参考
SSHの公開鍵を作成しGithubに登録する手順 - mon_sat at Co-Edo(半年前の自分への教科書 / 別院)
追記
別件だけどこういうことも起きた。
mac再起動したら、GithubにSSHでアクセスできなくなった - 狂ったお茶会のlog