OK answered this myself. This is perfect, using a password-less pass-
phrase doesn't require ssh-agent to be running! :)
Matt
On Aug 1, 9:54 am, goodieboy <[EMAIL PROTECTED]> wrote:
> Jamis,
>
> I'm gong to go with the password-less passphrase. For that to work
> though, does the machine that Capistrano is being executed from need
> ssh-agent running?
>
> Thanks
> Matt
>
> On Jul 26, 4:02 pm, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
>
> > I'd actually recommend using a passphrase-less key, in that case. It's
> > certainlynoless secure than hardcoding the passphrase in your
> > application.
>
> > To answer your question, though, there is not really a way to specify
> > the passphrase directly to use to Capistrano. There is a
> > scm_passphrase variable, but that is only used when the passphrase is
> > being prompted for by subversion, not when you are trying to connect
> > to your hosts.
>
> > - Jamis
>
> > On 7/26/07, goodieboy <[EMAIL PROTECTED]> wrote:
>
> > > Hi Jamis,
>
> > > Thanks! I finally got it running a bit.I had some problems with file
> > > paths. I got lucky though because I was only getting hangups until I
> > > accidentally started up ssh-agent and added my key. Once I did that
> > > (restarted rails), I was able to run some of my tasks.
>
> > > My question now is about authentication. I'd really like to find a way
> > > to either pass-in an SSH key pass-phrase directly to Capistrano OR,
> > > completely avoid it and use ssh-agent. The problem with the former is
> > > that I don't know how to pass thepasswordinto Capistrano when NOT on
> > > the command line (I'm now doing this in Rails), the problem with the
> > > latter is that ssh-agent is session based, and to run it every time
> > > means checking to see if it's running, and then setting the correct
> > > env variables.
>
> > > Is there a way to create a before-all hook that passes in the pass-
> > > phrase manually to STDIN?
>
> > > To be more clear on what I'm trying to do... I'm building a web-based
> > > deployment tool for a group of websites. All of my tasks/recipes work
> > > great. It's this darned authentication thing that's hold me up! :)
>
> > > Again, thanks for all of your great, amazing work and help,
> > > Matt
>
> > > On Jul 26, 1:41 pm, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
> > > > On 7/26/07, goodieboy <[EMAIL PROTECTED]> wrote:
>
> > > > > OK you mean config.logger? I set that but still am seeing nothing. :-
> > > > > ( How do I call the monitor uptime task?
>
> > > > Should just be:
>
> > > > config.uptime
>
> > > > I don't have any time to do more investigation on this today, but if
> > > > you are still having problems, I'll try and look into it tomorrow.
>
> > > > - Jamis
>
> > > > > Thanks,
> > > > > Matt
>
> > > > > On Jul 26, 12:58 pm, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
> > > > > > ah, you'll also need to set the verbosity of the logger, which
> > > > > > defaults to "silent as death".
>
> > > > > > logger.level = 3
>
> > > > > > - Jamis
>
> > > > > > On 7/26/07, goodieboy <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Jamis,
>
> > > > > > > I have to admit I'm a *little*, just a little :) lost. How do I
> > > > > > > for
> > > > > > > example call the different tasks while using the capistrano-ext/
> > > > > > > multistage? Right now I'm just trying to do an "uptime" but
> > > > > > > gettingno
> > > > > > > output from output.string
>
> > > > > > > Thank you!
> > > > > > > Matt
>
> > > > > > > On Jul 26, 12:24 pm, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
> > > > > > > > Something like this, maybe (wholly untested):
>
> > > > > > > > require 'capistrano/configuration'
> > > > > > > > require 'stringio'
>
> > > > > > > > output = StringIO.new
> > > > > > > > config = Capistrano::Configuration.new
> > > > > > > > config.logger = Capistrano::Logger.new(:output => output)
>
> > > > > > > > config.load "/path/to/Capfile"
> > > > > > > > config.set :user, "user_to_deploy_as"
>
> > > > > > > > config.deploy
> > > > > > > > puts output.string
>
> > > > > > > > - Jamis
>
> > > > > > > > On 7/26/07, goodieboy <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > Hi Jamis,
>
> > > > > > > > > You mean, I can execute capistrano from ruby (rails) and have
> > > > > > > > > it
> > > > > > > > > execute as the correct user?! How do you do that? Can you
> > > > > > > > > show me an
> > > > > > > > > example, I do know Rails and I can easily get it setup on the
> > > > > > > > > server.
>
> > > > > > > > > Matt
>
> > > > > > > > > On Jul 26, 11:25 am, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
> > > > > > > > > > Well...you could implement your web UI in Ruby and then
> > > > > > > > > > just require
> > > > > > > > > > capistrano and invoke the tasks directly. :)
>
> > > > > > > > > > - Jamis
>
> > > > > > > > > > On 7/26/07, goodieboy <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > > Thanks Jamis.
>
> > > > > > > > > > > Unfortunately I can't do that. User output is essential.
> > > > > > > > > > > I'm
> > > > > > > > > > > experimenting with issuing the command using su. By doing
> > > > > > > > > > > something
> > > > > > > > > > > like:
>
> > > > > > > > > > > echo 'MyPassWord' | su - deployer -c 'cd project; cap
> > > > > > > > > > > deploy;'
>
> > > > > > > > > > > I realize there are security issues there, but the server
> > > > > > > > > > > has only a
> > > > > > > > > > > few users. And I'd make it so only apache could read
> > > > > > > > > > > that script
> > > > > > > > > > > file. Also, the file is NOT in the web root. Bad idea?
>
> > > > > > > > > > > Any other ideas? :-)
>
> > > > > > > > > > > Matt
>
> > > > > > > > > > > On Jul 26, 9:47 am, "Jamis Buck" <[EMAIL PROTECTED]>
> > > > > > > > > > > wrote:
> > > > > > > > > > > > You could try doing it async--have the request add a
> > > > > > > > > > > > record to a queue
> > > > > > > > > > > > somewhere. Then (via cron or some other external
> > > > > > > > > > > > process) you
> > > > > > > > > > > > periodically read from the queue and fire off the
> > > > > > > > > > > > deploy command that
> > > > > > > > > > > > way.
>
> > > > > > > > > > > > It does mean you won't be able to capture the output
> > > > > > > > > > > > and feed it back
> > > > > > > > > > > > to the user in real time, though.
>
> > > > > > > > > > > > - Jamis
>
> > > > > > > > > > > > On 7/26/07, goodieboy <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > > > > Hi,
>
> > > > > > > > > > > > > I need to find a way to trigger a cap deploy from a
> > > > > > > > > > > > > web application/
> > > > > > > > > > > > > form. I'm using PHP as the scripting language and I
> > > > > > > > > > > > > know I can just
> > > > > > > > > > > > > issue an exec('cd /my-app; cap deploy'). But the
> > > > > > > > > > > > > problem is
> > > > > > > > > > > > > permissions. I have a specific user setup for the
> > > > > > > > > > > > > project and I can't
> > > > > > > > > > > > > have apache executing "cap deploy" directly. Does
> > > > > > > > > > > > > anyone know how to
> > > > > > > > > > > > > do this correctly?
>
> > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > Matt
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---