Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Background: I've setup an ssh key to avoid having to use passwords with capistrano per A basic ssh to my server does work fine without asking for passwords. I'm using "" 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


PS. The permissions on the server are:

drwx------    2 mylogin pg840652  4096 2010-02-22 15:56 .ssh
-rw-------    1 mylogin pg840652  404 2010-02-22 15:45 authorized_keys
share|improve this question

migrated from Feb 25 '10 at 15:26

This question came from our site for computer enthusiasts and power users.

(I wonder if the author's own answer actually implies this has been solved...?) – Arjan Feb 25 '10 at 13:19

got it with:

set :repository,  "/home/me/git_repo/myapp.git"
set :local_repository,  "ssh://"
share|improve this answer

Typically when I see this issue, the permissions on the server are not perfectly correct. They key will only be used if the permissions on each side are exactly set. I would double check both the file and group and the read/write/execute settings for the key files.

share|improve this answer
At one stage it wasn't working at all and I did some chmod'ing, and after this I do have password ssh working. So I have (a) passwork ssh working, (b) passwords 'git push', working but (c) only 2 of the 3 times 'cap deploy' was asking for a passwork are working? I've put the permissions I see in the post. Any ideas? thanks... – Greg Feb 23 '10 at 1:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.