Google Groups Home
Help | Sign in
Capistrano and private git repos
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Jim Neath  
View profile
 More options 16 Jul, 13:32
From: "Jim Neath" <jimne...@googlemail.com>
Date: Wed, 16 Jul 2008 13:32:32 +0100
Local: Wed 16 Jul 2008 13:32
Subject: Capistrano and private git repos

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


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon King  
View profile
 More options 16 Jul, 14:01
From: "Simon King" <si...@organicinternet.co.uk>
Date: Wed, 16 Jul 2008 14:01:15 +0100
Local: Wed 16 Jul 2008 14:01
Subject: Re: [NWRUG] Capistrano and private git repos
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

--
--------------------------------------------
Simon King
Organic Internet
+447773806713
si...@organicinternet.co.uk
http://www.organicinternet.co.uk/
Registered in England #05702270
--------------------------------------------

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Neath  
View profile
 More options 16 Jul, 14:17
From: "Jim Neath" <jimne...@googlemail.com>
Date: Wed, 16 Jul 2008 14:17:37 +0100
Local: Wed 16 Jul 2008 14:17
Subject: Re: [NWRUG] Re: Capistrano and private git repos

Paperclip is awesome.

Think I might have solved this. It's a case of me being an idiot. (old cap,
no git on server)

Cheers,

Jim

On Wed, Jul 16, 2008 at 2:01 PM, Simon King <si...@organicinternet.co.uk>
wrote:

--
Jim Neath - Manchester based Ruby on Rails Developer
http://jimneath.org

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google