title: Github: Permission denied (publickey)
body: <p><strong>Update</strong></p>
  
  <p>Ran into this again today - when my work laptop was taken home - appears that a Window domain might be the underlying issue. Found the solution here:</p>
  
  <p><a href="https://stackoverflow.com/questions/2840871/ssh-is-looking-in-the-wrong-place-for-the-public-private-key-pair-on-windows">SSH is looking in the wrong place for the public/private key pair on Windows</a></p>
  
  <p><strong>Original Question</strong></p>
  
  <p>I've had Git working fine for the last few months, this morning I try and make a push and I'm asked to confirm RSA cert for the IP - I double check github IP and it's ok so I add the certificate. But I'm getting:</p>
  
  <pre><code>Permission denied (publickey).
  fatal: The remote end hung up unexpectedly
  </code></pre>
  
  <p>When I try to push or pull.</p>
  
  <p>I read <a href="https://stackoverflow.com/questions/2643502/git-permission-denied-publickey">Git - Permission denied (publickey)</a> and tried adding my key again to Github but I'm told:</p>
  
  <pre><code>Key is already in use
  </code></pre>
  
  <p>Running</p>
  
  <pre><code>ssh -vT git@github.com
  </code></pre>
  
  <p>Retuns:</p>
  
  <pre><code>OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
  debug1: Connecting to github.com [207.97.227.239] port 22.
  debug1: Connection established.
  debug1: identity file /p/.ssh/identity type -1
  debug1: identity file /p/.ssh/id_rsa type -1
  debug1: identity file /p/.ssh/id_dsa type -1
  debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debia
  n-5github2
  debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH*
  debug1: Enabling compatibility mode for protocol 2.0
  debug1: Local version string SSH-2.0-OpenSSH_4.6
  debug1: SSH2_MSG_KEXINIT sent
  debug1: SSH2_MSG_KEXINIT received
  debug1: kex: server-&gt;client aes128-cbc hmac-md5 none
  debug1: kex: client-&gt;server aes128-cbc hmac-md5 none
  debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024&lt;1024&lt;8192) sent
  debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
  debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
  debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
  debug1: Host 'github.com' is known and matches the RSA host key.
  debug1: Found key in /p/.ssh/known_hosts:1
  debug1: ssh_rsa_verify: signature correct
  debug1: SSH2_MSG_NEWKEYS sent
  debug1: expecting SSH2_MSG_NEWKEYS
  debug1: SSH2_MSG_NEWKEYS received
  debug1: SSH2_MSG_SERVICE_REQUEST sent
  debug1: SSH2_MSG_SERVICE_ACCEPT received
  debug1: Authentications that can continue: publickey
  debug1: Next authentication method: publickey
  debug1: Trying private key: /p/.ssh/identity
  debug1: Trying private key: /p/.ssh/id_rsa
  debug1: Trying private key: /p/.ssh/id_dsa
  debug1: No more authentication methods to try.
  Permission denied (publickey).
  </code></pre>
  
  <p>Can anyone point me in the right direction?</p>