はじめに
GitHubにpushしようとしたらエラーが発生しました。
昨日までpushできていたのに、、
前提
- Mac
- SSHキーは存在している
問題
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-agentに鍵を登録する
ssh-add --apple-use-keychain <秘密鍵のパス>
おわりに
昨日までpushできていたのになぜかssh-agentから鍵が削除されていました。
初めてのことだったので訳がわかりませんでした。
