Bit bucketのリモートリポジトリから、新規作成したローカルのフォルダにgit cloneしたいのですが、下記エラーが表示されます。(mac osx)
Permission denied (publickey).
fatal: could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
やったこと
①Bitbucketのsshに公開鍵の登録
②ローカルconfigに下記の追記、
Host bitbucket
Hostname bitbucket.org
User PC名
IdentityFile ~/.ssh/秘密鍵
③新規作成したローカルフォルダで
git clone git@bitbucket.org〜コマンド
試したこと
chmod 600 秘密鍵
ssh -T bitbucket
結果
Permission denied (publicly).
以前git cloneしたときは出来たので、今回の原因がわかりません。宜しくお願いします。