Friday, September 12, 2008

Deploying Git over SSH (username, password) with Capistrano

This one bit me.

Hard.

If your Git repo is accessed via SSH using a username and password instead of a public key, you're probably having problems getting it to work. Notably, the password prompt isn't prompting you for your goddamn password.

Do this in your deploy file:

default_run_options[:pty] = true
set :scm_password, Proc.new { Capistrano::CLI.password_prompt "SCM Password: "}


Using Capistrano 2.5.

default_run_topions[:pty] will fuck up your output, but it's necessary for reasons I don't fully grasp and after about 3 hours don't care to.

1 comment:

Jeremy Roush said...

THANK YOU