git bashコマンドで、エラー「Permission denied (publickey)」が出た場合の対処方法についてまとめました。
【エラー対策】Permission denied (publickey)
git bashコマンドでpush、cloneを行おうとすると以下のエラーが出ることがあります。
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) に、秘密鍵を追加することで治りました。
eval `ssh-agent`
ssh-add [秘密鍵ファイルのパス]
– | 関連記事 |
---|---|
1 | ■【git入門】Githubの使い方(Windows編) |
2 | ■【Git/Github入門】基本的な使い方・コマンド集 |
コメント