1

I am trying to deploy a specific revision to a server using Capistrano (we are trying to add a new server to the cluster and of course want it to have the same revision as the other machines). The issue seems to be that we are working on a branch. So, if we do:

cap production deploy:cold -S revision=bb88d26c4ec9e6c4fa132c63f79c8fdf8aa5aec4

it does:

* executing "git clone -q --depth 1 ssh://git@xxx.unfuddle.com/xxx/mc.git /u/apps/xxx/releases/20110407083545 && cd /u/apps/xxx/releases/20110407083545 && git checkout -q -b deploy bb88d26c4ec9e6c4fa132c63f79c8fdf8aa5aec4 && (echo bb88d26c4ec9e6c4fa132c63f79c8fdf8aa5aec4 > /u/apps/xxx/releases/20110407083545/REVISION)"

but we get:

** [new.server.com :: err] fatal: reference is not a tree: bb88d26c4ec9e6c4fa132c63f79c8fdf8aa5aec4

It seems to be ignoring the branch setting in the deploy.rb:

set :branch, "new_ui"

Could this be because of the multistage? Or something else interfering?

phil
  • 4,668
  • 4
  • 33
  • 51
  • Sure you've actually pushed that revision to your remote repository? Should have nothing to do with your branch setting, capistrano only uses your branch setting to find the latest revision of that branch locally before running off. – fx_ Apr 07 '11 at 08:54
  • check: http://stackoverflow.com/questions/1524204/using-capistrano-to-deploy-from-different-git-branches – RAJ Dec 21 '11 at 08:13
  • Check this http://stackoverflow.com/questions/1524204/using-capistrano-to-deploy-from-different-git-branches It may help you – RAJ Dec 21 '11 at 08:14

1 Answers1

0

You usually get this error because you haven't pushed your repo up to your remote repo. You may only have a local branch called new_ui, but you're not tracking it remotely - so when you push, the branch is not reflected on your remote repo.

Joerg
  • 3,553
  • 4
  • 32
  • 41