I've search through the group, and I've been trying to figure out a way
to setup public/private key deployment for my particular situation.

My SVN server is separate from my app server, and it requires public
key auth. I understand that Net::SSH does not support agent forwarding,
so I figured I have two options: 1) create a passwordless key just for
checking out from SVN (not totally desirable), or 2) setup a long
running ssh-agent using keychain
(http://www.gentoo.org/proj/en/keychain/).

I've tried adding keychain to different files on my SVN server
(~/.bashrc, ~/.bash_profile, /etc/bash.bashrc, /etc/profile), but I'm
never able to get the ssh-agent environment variables to work with
capistrano. I'm not sure if the way capistrano is connecting it isn't
sourcing my .bashrc file or something?

I've even tried running keychain in my before_update_code to set the
environment variables:

task :before_update_code do
  run 'env'
  run 'keychain id_rsa' do |channel, stream, data|
    if data =~ /^Enter passphrase/
      $stdout.write("Please enter your SSH key password: ")
      pwd = $stdin.readline
      $stdout.puts pwd
      channel.send_data pwd
    end
  end
  run 'env'
end

This works in the sense that the next time I log in to my SVN server
keychain automatically picks up my ssh key, but the capistrano session
does not seem to pick up the environment variables for the ssh-agent.

So, capistrano won't pick up the environment variables from my profile,
and I can't inject environment variables into the capistrano session.
Does any one know how to accomplish either of these two?

TIA,
Paul


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to