Permission denied (publickey). (Vagrant)

(参考: http://forumsarchive.laravel.io/viewtopic.php?pid=65817 , (ref:2014/10/02))

ssh-keygenしてgithubに公開鍵を追加して

git clone

しても

Permission denied (publickey).
fatal: Could not read from remote repository.

と言われた時のメモ

ssh -T git@github.com  

してみる

Permissions 0644 for '/home/vagrant/.ssh/id_rsa.pub' are too open.                                      
It is required that your private key files are NOT accessible by others.  
This private key will be ignored.                                                                       │
bad permissions: ignore key: /home/vagrant/.ssh/id_rsa.pub  

ちーん

chmod 0644 ~/.ssh/id_rsa.pub

する

ssh -T git@github.com  

する

Hi matsunoki! You've successfully authenticated, but GitHub does not provide shell access.   

Hi!!!!