タダです。
小ネタですけど、git cloneした時にPermission denied (publickey).が表示されました。 このエラーメッセージに対する対処法を記録しておきます。
git clone git@github.com:xxxx/xxxx.git Cloning into 'xxxx'... Warning: Permanently added the RSA host key for IP address 'xxx.xxx.xxx.xxx' 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.
結論
ググってみたら解決方法がたくさんでてきたのですが、私のGithubに公開鍵を登録していない状態だったので、メッセージが表示されました。
# 鍵の生成 ssh-keygen -C "git@github.com" -t rsa # 秘密鍵の登録 ssh-add /Users/tada/.ssh/xxxx # Github側の作業(公開鍵の登録) 1. アカウント名をプルダウンして、Settingsを選択する 2. SSH and GPG keysより「New SSH key」で公開鍵名と公開鍵を登録する # テスト ssh -T git@github.com Hi xxxx! You've successfully authenticated, but GitHub does not provide shell access.