title: Capistrano is failing because it cannot connect to remote git repository
body: <p>I am trying to deploy using Capistrano 3.x.</p>
  
  <p>I configured agent forwarding in my <em>~/.ssh/config</em> file:</p>
  
  <pre><code>Host git-codecommit.*.amazonaws.com
    Hostname xxxx
    ForwardAgent yes
    IdentityFile /path/to/codecommit_rsa
  </code></pre>
  
  <p>I did the same thing for my server connection with <code>ForwardAgent yes</code> also.</p>
  
  <p>I verified my server allows agent forwarding in the <em>/etc/ssh/sshd_config</em> file also:</p>
  
  <pre><code>AllowAgentForwarding yes
  </code></pre>
  
  
  
  <pre><code>  INFO ----------------------------------------------------------------
    INFO START 2017-11-18 16:09:44 -0500 cap production deploy
    INFO ---------------------------------------------------------------------------
    INFO [b43ed70f] Running /usr/bin/env mkdir -p /tmp as deploy@50.116.2.15
   DEBUG [b43ed70f] Command: /usr/bin/env mkdir -p /tmp
    INFO [b43ed70f] Finished in 1.132 seconds with exit status 0 (successful).
   DEBUG Uploading /tmp/git-ssh-testapp-production-blankman.sh 0.0%
    INFO Uploading /tmp/git-ssh-testapp-production-blankman.sh 100.0%
    INFO [b1a90dc1] Running /usr/bin/env chmod 700 /tmp/git-ssh-testapp-production-blankman.sh as deploy@50.116.2.15
   DEBUG [b1a90dc1] Command: /usr/bin/env chmod 700 /tmp/git-ssh-testapp-production-blankman.sh
    INFO [b1a90dc1] Finished in 0.265 seconds with exit status 0 (successful).
    INFO [b323707d] Running /usr/bin/env git ls-remote ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/fuweb HEAD as deploy@50.116.2.15
   DEBUG [b323707d] Command: ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-testapp-production-blankman.sh" ; /usr/bin/env git ls-remote ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/fuweb HEAD )
   DEBUG [b323707d]   Permission denied (publickey).
   DEBUG [b323707d]   fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p>What am I missing here?</p>