Capistrano3でデプロイする場合、VPSとGitHubについて鍵認証が必要かどうか教えて頂けないでしょうか?
現状
Windowsに秘密鍵の設置完了。
VPS側に公開鍵の設置完了し鍵認証でSSH接続できてます。
GitHubでレポジトリ作成完了。
GitHubに公開鍵の設置完了し仮想マシンからGitHUbに接続できています。
[vagrant@localhost chibi]$ ssh -T git@github.com Enter passphrase for key '/home/vagrant/.ssh/id_rsa': Hi XXXXX! You've successfully authenticated, but GitHub does not provide shell access.
VPSには秘密鍵の設置はしておらず、VPSからGitHubに接続できませんでした。
[panda@ik1-301-10835 ~]$ ssh -T git@github.com The authenticity of host 'github.com (192.30.255.112)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCXXXXXXXXXXXX. RSA key fingerprint is MD5:16:27:ac:a5:76:28:2d:36:63:1b:56:XXXXXXXXXXXX. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,192.30.255.112' (RSA) to the list of known hosts. Permission denied (publickey).
知りたいのは、Capistranoでデプロイする場合、VPS側でGitHubに接続出来るように設定する必要があるのかどうかです。
初めてのデプロイで以下のエラーで10日以上も嵌ってしまっている中で疑問に思い質問させて頂きました。
$ bundle exec cap production deploy [8aed9337] Command: cd /usr/share/nginx/html/repo && ( export RBENV_ROOT="/root/.rbenv" RBENV_VERSION="" GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-chibi-production-vagrant.sh" ; /usr/bin/env git rev-list --max-count=1 master ) DEBUG [9409e47b] fatal: Not a git repository (or any of the parent directories): .git (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as kinoko@wonder-gate.com: git exit status: 128 git stdout: fatal: Not a git repository (or any of the parent directories): .git git stderr: Nothing written SSHKit::Command::Failed: git exit status: 128 git stdout: fatal: Not a git repository (or any of the parent directories): .git git stderr: Nothing written Tasks: TOP => deploy:set_current_revision => git:set_current_revision (See full trace by running task with --trace)
初めてのデプロイで1ヶ月以上もいろんなエラーで苦しんでいます。
解決方法も含めご教示お願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。