# Capistrano still asks for the 1st password even though I've set up an ssh key?

**URL:** <https://www.ruby-forum.com/t/capistrano-still-asks-for-the-1st-password-even-though-ive-set-up-an-ssh-key/183956>\
**Category:** Rails\
**Created:** [February 23, 2010, 2:05am UTC](https://www.ruby-forum.com/t/capistrano-still-asks-for-the-1st-password-even-though-ive-set-up-an-ssh-key/183956 "2010-02-23T02:05:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![greghauptmann](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@greghauptmann](https://www.ruby-forum.com/u/greghauptmann)\
**Post date:** [February 23, 2010, 2:05am UTC](https://www.ruby-forum.com/t/capistrano-still-asks-for-the-1st-password-even-though-ive-set-up-an-ssh-key/183956/1 "2010-02-23T02:05:52Z")

</div>

Hi,

Background: I’ve setup an ssh key to avoid having to use passwords  
with capistrano per  
[http://www.picky-ricky.com/2009/01/ssh-keys-with-capistrano.html](http://www.picky-ricky.com/2009/01/ssh-keys-with-capistrano.html).  
A basic ssh to my server does work fine without asking for passwords.  
I’m using “[dreamhost.com](http://dreamhost.com)” for hosting.

Issue - When I run ‘cap deploy’ I still get asked for the 1st password  
(even through the previous 2nd and 3rd password requests are now  
automated). It is the capistrano command that start with “git clone -  
q ssh:…” for which the password is being requested.

Question - Is there something I’ve missed? How can I get “cap deploy”  
totally passwordless?

# Some excerts from config/deploy.rb are:

# set :use\_sudo, false ssh\_options[:keys] = [File.join(ENV[“HOME”], “.ssh”, “id\_rsa”)] default\_run\_options[:pty] = true

thanks

---

<div class="post-metadata">

**Author:** ![greghauptmann](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@greghauptmann](https://www.ruby-forum.com/u/greghauptmann)\
**Post date:** [February 23, 2010, 8:12pm UTC](https://www.ruby-forum.com/t/capistrano-still-asks-for-the-1st-password-even-though-ive-set-up-an-ssh-key/183956/2 "2010-02-23T20:12:09Z")

</div>

Greg,

Where is your repository? I wonder if your key is getting you into  
your shell and then it is prompting for your password to access the  
repo?

–Tom

---

<div class="post-metadata">

**Author:** ![greghauptmann](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@greghauptmann](https://www.ruby-forum.com/u/greghauptmann)\
**Post date:** [February 24, 2010, 12:38am UTC](https://www.ruby-forum.com/t/capistrano-still-asks-for-the-1st-password-even-though-ive-set-up-an-ssh-key/183956/3 "2010-02-24T00:38:34Z")

</div>

it’s on the same server - actually got it figured out with help of  
some others - the following got it working:

set :repository, “/home/me/git\_repo/myapp.git”  
set :local\_repository, “ssh://removed\_email\_address@domain.invalid/home/me/git\_repo/  
myapp.git”
