title: ssh-agent, capistrano and forwarding keys to github
body: <p>I have quite a strange issue with Capistrano deployment, my colleagues machine works fine but mine refuses to play nice.</p>
  
  <p>I am using cygwin and have an external ruby installation.</p>
  
  <p>We are using the root user on our server and have added ssh-keys to ./ssh/authorized_keys2 which allows me to deploy and ssh into the server.</p>
  
  <p>The problem becomes apparent when trying to clone a submodule to the remote cache. I always get the error publickey denied.</p>
  
  <p>Below is the deploy file:</p>
  
  <pre><code># What is the name of the local application?
  set :application, "domain"
  
  # What user is connecting to the remote server?
  set :user, "root"
  
  # Where is the local repository?
  set :repository, "file:///blah.git"
  set :local_repository,  " ssh://blah.git"
  
  # What is the production server domain?
  role :web, "vserver"
  
  # What remote directory hosts the production website?
  set :deploy_to,   "/home/&lt;user&gt;/public_html/"
  
  # Is sudo required to manipulate files on the remote server?
  set :use_sudo, false
  
  # What version control solution does the project use?
  set :scm,        :git
  set :branch,     'master'
  
  # How are the project files being transferred?
  set :deploy_via, :remote_cache
  
  # Maintain a local repository cache. Speeds up the copy process.
  set :copy_cache, true
  
  # Ignore any local files?
  set :copy_exclude, %w(.git,deployment,.project)
  
  #enabled submodules
  set :git_enable_submodules, 1
  
  set :group_writable, false
  
  set :ssh_options, {:forward_agent =&gt; true}
  </code></pre>
  
  <p>I realise I will not have included enough information, just let me know what gaps need filling as it is slowly driving me insane why mine fails and my colleagues works flawlessly. Any help would be great I have been looking on here and other various sources all day and nothing has sorted this issue.</p>