[Feature] Agent Forwarding #23

mrrooijen opened this Issue Jun 25, 2012 · 6 comments


None yet

5 participants


Hi Nadarei,

Agent Forwarding is probably one of the more appealing features of Capistrano. With this option enabled, you won't get this error because it allows you to use your local ssh keys. Normally, like in this case, you have to log in to your server, generate a new SSH key and apply that SSH key to for example Github. Then, this command would work. However with Agent Forwarding you do not need to do that and you can simply use your own local machine's SSH key instead.

-----> Cloning the Git repository
       Initialized empty Git repository in /home/deployer/app/tmp/build-1340639447120/.git/
       Host key verification failed.
       fatal: The remote end hung up unexpectedly


If you're using your own private keys for git, you want to tell Capistrano to use agent forwarding with this command. Agent forwarding can make key management much simpler as it uses your local keys instead of keys installed on the server.

ssh_options[:forward_agent] = true # in Capistrano

It would be great if Mina could also support this feature as it's always pain to add a new key to GitHub for every single server you want to hook up to it.

Note that I looked around and didn't find the option, but if I overlooked something please let me know.



Opened an internal discussion in Trello: https://trello.com/c/FH7nfY41

I'll update this issue when there's progress.



Excellent, thanks!


Until a more convenient solution is implemented, you can easily achieve this by simply appending or prepending '-A' to another option

set :port, '22 -A'

or even

set :user, '-A youruser'

should work.

+1 for a future

set :ssh_options, '-A'

Nice one. Didn't even think of that. Tried it and works perfectly. I'll use this until an additional_options string can be passed, or a real forward_agent option becomes available.


+1 for a forward_agent option.

SSH Agent Forwarding is almost always what I want when deploying, unless other people deploy radically differently regularly forward_agent = true would be a nice default to have.

@rstacruz rstacruz closed this in 7bacc8a Sep 8, 2012
mina-deploy member

Scheduled for v0.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment