LoginSignup
2
2

More than 5 years have passed since last update.

GitHub ssh-T git@github.comでPermission deniedの回避方法をメモ

Last updated at Posted at 2014-02-14

GitHubの準備で、公開鍵の登録確認ではまってしまったのでメモ。

現象

$ssh -T git@github.com
The authenticity of host 'github.com (192.30.252.129)' can't be established.
RSA key fingerprint is (フィンガープリント).
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com' (RSA) to the list of known hosts.
Enter passphrase for key '/c/Users/(ユーザー名)/.ssh/id_rsa':
Permission denied (publickey).

回避方法メモ

  • 1.viで~/.ssh/known_hostsをひらき、1行目を削除
1: github.com, 192.30.252.129 ・・・ ← 削除
  • 2.ssh-agentの起動
$ eval $(ssh-agent)
Agent pid ****

$ ssh-add -l
The agent has no identities.  ← このメッセージが出ればOK
  • 3.ssh-addコマンドで秘密鍵を登録
ssh-add c:\Users/(ユーザー名\.ssh\id_rsa

これでGitHubとの認証通信 ssh-T git@github.com ができるようになった。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2