Think I might have solved this. It's a case of me being an idiot. (old cap,
no git on server)
> Hi Jim
> Not really sure what the problem is, but here's what works for me:
> I always need to run ssh-add before my keys get forwarded properly on
> the remote side. I also have this in ~/.ssh/config
> (where 123.123.123.* is the ip range of my production machines)
> Host 123.123.123.*
> ForwardAgent yes
> Host *
> ForwardAgent no
> I also get errors sometimes when I haven't pushed my local changes to
> the remote repository. The commit id used for the checkout only exists
> locally in that case, so it fails.
> I'm just about to put your swf_upload/paperclip tutorial into practice
> btw, so big thanks!
> Oh, check your cap version too, as one of them has problems with git
> (possibly 2.3)
> HTH,
> Simon
> On Wed, Jul 16, 2008 at 1:32 PM, Jim Neath <jimne...@googlemail.com>
> wrote:
> > I've been having problems over the last few days trying to deploy a site
> > from a private git repo via capistrano.
> > Has anyone got any resources or tips?
> > Here's the relevant parts of the recipe:
> > #############################################################
> > # Settings
> > #############################################################
> > default_run_options[:pty] = true
> > set :use_sudo, true
> > ssh_options[:forward_agent] = true
> > ssh_options[:keys] = %w(/Users/jimneath/.ssh/id_rsa.pub)
> > #############################################################
> > # Servers
> > #############################################################
> > set :user, "jim"
> > set :domain, "www.domain.com"
> > server domain, :app, :web
> > role :db, domain, :primary => true
> > #############################################################
> > # Git
> > #############################################################
> > set :scm, :git
> > set :branch, "master"
> > set :scm_passphrase, "password"
> > set :repository, "g...@github.com:JimNeath/project.git"
> > set :deploy_via, :remote_cache
> > There error I keep getting is:
> > command "if [ -d /path/to/site/shared/cached-copy ]; then cd
> > /path/to/site/shared/cached-copy && git fetch -q origin && git reset -q
> > --hard 151a2cbdadac526504b8d5101bee65a62de5d401; else git clone -q
> > g...@github.com:JimNeath/project.git /path/to/site/shared/cached-copy &&
> cd
> > /path/to/site/shared/cached-copy && git checkout -q -b deploy
> > 151a2cbdadac526504b8d5101bee65a62de5d401; fi" failed on www.domain.com
> > Any help would be great.
> > - Jim
> > --
> > Jim Neath - Manchester based Ruby on Rails Developer
> > http://jimneath.org
> --
> --------------------------------------------
> Simon King
> Organic Internet
> +447773806713
> si...@organicinternet.co.uk
> http://www.organicinternet.co.uk/
> Registered in England #05702270
> --------------------------------------------