capistrano Ruby-on-Railsプロジェクトのデプロイでは、デプロイメントが失敗し、致命的なエラーで終了します。メッセージは'deploy'という名前のブランチが既に存在しています
A branch named 'deploy' already exists.
です。もちろん、そのブランチを展開しようとしているので、ブランチは既に存在しています。どんなアイデアが間違っている?これは、ログで、我々はGitの、Capistranoの枝がdeploy
に設定されている、カピストラーノのバージョンは、2.15.9
あるルビーのバージョンを使用していることgit checkout -q -b deploy sha_value
で失敗したコマンド2.3.1
$ cap staging deploy
triggering load callbacks
* 2016-09-13 12:12:38 executing `staging'
triggering start callbacks for `deploy'
* 2016-09-13 12:12:38 executing `multistage:ensure'
* 2016-09-13 12:12:38 executing `deploy'
* 2016-09-13 12:12:38 executing `deploy:update'
** transaction: start
* 2016-09-13 12:12:38 executing `deploy:update_code'
executing locally: "git ls-remote [email protected]:developer-group/my-site.git deploy"
command finished in 615ms
* executing "git clone -q -b deploy --depth 1 [email protected]:developer-group/my-site.git /home/my-user/sites/my-domain.de/releases/201609131&& cd /home/my-user/sites/my-domain.de/releases/201609131&& git checkout -q -b deploy fe7bd80727d9cce1a275a531c6e21b84e15ab0cd && rm -Rf /home/my-user/sites/my-domain.de/releases/201609131/.git && (echo fe7bd80727d9cce1a275a531c6e21b84e15ab0cd > /home/my-user/sites/my-domain.de/releases/201609131/REVISION)"
servers: ["my-server"]
[my-server] executing command
** [my-server :: err] fatal: A branch named 'deploy' already exists.
command finished in 2481ms
です。
あなたのコードはうまくいかないようです。追加の手がかりについては、より多くの情報を提供する必要があります。 –
あなたのCapistrano設定に何らかの設定エラーがあるようです。 私はあなたがバージョン管理のためにgitのようなものを使用していると仮定しています。 展開時にしようとするものは、サーバーにsshして、展開するように指示したブランチをチェックアウトすることです。 デプロイスクリプトの実行時にブランチ 'deploy'を作成し、アップストリームブランチ(例えばorigin/deploy)をトラッキングするように設定した場合、ブランチがすでに存在する場合は実行できません。 capistrano configの 'update_code'部分を変更しましたか?これはなぜ起こっているのでしょうか – Frost
申し訳ありません、私は詳細を追加しました – 0x4a6f4672