5月
05
2009
githubでPermission denied (publickey).
投稿者: lllnorikolll, カテゴリ: Mac, メモ箱, tags: Git, githubgithubにgit pushしようとしたら、↓のようなメッセージがでた。
SSH Keyの設定は、githubの説明(ここ)のとおり設定してある。
$ git push origin master Permission denied (publickey). fatal: The remote end hung up unexpectedly
よくよく.~/.sshの中を見ると、configというファイルができていた。
中身を見てみると、↓のようになっている。
んっ?id_dsa???そりゃ動くわけないわ。。。id_rsaだもん。。。
$ cat config Host github.com User git Port 22 Hostname github.com IdentityFile ~/.ssh/id_dsa TCPKeepAlive yes IdentitiesOnly yes
というわけで、「IdentityFile ~/.ssh/id_dsa」部分を「IdentityFile ~/.ssh/id_rsa」に書き換え。
ついでに、同じく~/.sshの中にあるknown_hostsというファイルから、「github.com」で始まる一行を削除。
気を取り直してgit pushすると、できた☆

エントリ (RSS)