質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Capistrano

Rubyで書かれたサーバオーケストレーションで、複数のサーバでスクリプトを実行する際に用いられます。主な使用用途はWebアプリケーションのデプロイメントです。 アプリケーションのバージョンアップ自動化、およびデータベースの変更などもできます。

Q&A

解決済

1回答

481閲覧

capistrano3で$ bundle exec cap production deploy --trace --dry-run時のエラーについて質問させていただきます。

koume

総合スコア458

Capistrano

Rubyで書かれたサーバオーケストレーションで、複数のサーバでスクリプトを実行する際に用いられます。主な使用用途はWebアプリケーションのデプロイメントです。 アプリケーションのバージョンアップ自動化、およびデータベースの変更などもできます。

0グッド

0クリップ

投稿2019/03/20 07:43

capistrano3でRailsアプリをデプロイしようとトライしていますがエラーが発生してしまいます。
自力では全く手も足も出ない状況になってしまい困っております。
どなたかご教示お願いできないでしょうか?

実行コード [vagrant@localhost chibi]$ bundle exec cap production deploy --trace --dry-run
一つ目のエラー? fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'

サイトで調べて以下を実行してみましたが解決出来ませんでした。(同じエラ-がでてしまいます)

[vagrant@localhost chibi]$ git config --global user.name "Yamada Taro" [vagrant@localhost chibi]$ git config --global user.email "example@gmail.com" [vagrant@localhost chibi]$ git config --global core.editor "Brackets" [vagrant@localhost chibi]$ git config --global color.ui auto [vagrant@localhost chibi]$ git config --global core.excludesfile ~/.gitignore_global [vagrant@localhost chibi]$ git config --global core.autocrlf input [vagrant@localhost chibi]$ vi ~/.gitignore_global gitignore_globalを作成しファイルやディレクトリのパターンを記述。 [vagrant@localhost chibi]$ git update-ref -d HEAD [vagrant@localhost chibi]$ git reset HEAD [vagrant@localhost chibi]$ git update-ref -d HEAD [vagrant@localhost chibi]$ git reset HEAD
二つ目のエラー?(サイトで調べられずなにも出来ずにいます) Skipping task `puma:restart'. Capistrano tasks may only be invoked once. Since task `puma:restart' was previously invoked, invoke("puma:restart") at /home/vagrant/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/capistrano3-puma-3.1.1/lib/capistrano/tasks/puma.rake:96 will be skipped. If you really meant to run this task again, use invoke!("puma:restart")
三つ目のエラー?(エラーなのかどうかもわかりません。) THIS BEHAVIOR MAY CHANGE IN A FUTURE VERSION OF CAPISTRANO. Please join the conversation here if this affects you. https://github.com/capistrano/capistrano/issues/1686

のようにエラーのようなものが表示されています。
サイトで調べても解決出来ないので嵌ってしまいました。
初心者の私ではそもそもエラーなのかどうがもわからない状態なのでファイルの記述が不足しているのか間違っているのかの判断もつかない状態です。

どなたか、解決方法などを教えていただけないでしょうか?
宜しくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

config/deploy/production.rbに以下を追記し解決出来ました。

set :ssh_options, {
port: XXXXX,
keys: [File.expand_path('~/.ssh/id_rsa')],
forward_agent: true,
auth_methods: %w(publickey)
}

投稿2019/03/21 04:29

koume

総合スコア458

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問