GithubとAWS EC2が接続できず困っています。
すみませんが、ご助力お願いできないでしょうか。
背景:GithubからAWS EC2へRailsのデプロイ
参考:https://qiita.com/iwaseasahi/items/b28f8b91c4638e2c57fd
gitの設定ファイルを作成し、鍵を作成、Githubに鍵を登録し、設定ファイルの権限変更まではいけました。
その次の、Githubの接続が上手くできません。
Githubに公開鍵を保存しているのですが、「Permission denied (publickey)」となります。
以下にログを記載します。
$ vi ~/.gitconfig $ cd / $ sudo chown test_user var $ cd /var/www/ $ sudo mkdir projects $ sudo chown test_user projects $ cd $ chmod 700 .ssh $ ssh-keygen -t rsa Generating public/private rsa key pair. Your identification has been saved in ***. Your public key has been saved in ***.pub. The key fingerprint is: *** $ vi config $ cat ***.pub ssh-rsa *** Githubに公開鍵を追加 $ chmod 600 config $ ssh -T git@github.com The authenticity of host 'github.com (140.82.114.3)' can't be established. RSA key fingerprint is ***. RSA key fingerprint is ***. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,140.82.114.3' (RSA) to the list of known hosts. Permission denied (publickey).
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2020/01/10 12:44