RailsとCapistranoでのデプロイ設定について質問があります。
AWSのEC2とGitHubの接続に関して分からない点があるので質問させて頂きます。
ローカルで以下のコマンドを打つと以下のようなエラーが出ます。
bundle exec cap production deploy:check
00:01 git:check 01 git ls-remote git@github.com:ユーザー名/リポジトリ名.git HEAD 01 Permission denied (publickey). 01 fatal: Could not read from remote repository. 01 01 Please make sure you have the correct access rights 01 and the repository exists. (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as ec2のユーザー名@IPアドレス: git exit status: 128 git stdout: Nothing written git stderr: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Caused by: SSHKit::Command::Failed: git exit status: 128 git stdout: Nothing written git stderr: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
ローカルからEC2には接続できます。
EC2上ではGitHubとSSH接続できgit cloneやgit pullはできます。
EC2でgit cloneやgit pullする時に鍵のパスフレーズを求められますが、Capistranoの時は鍵のパスフレーズを求められないため、そこが問題だと感じておりますが、対応方法が分かりません...
アドバイスなどよろしくお願いいたします。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。