title: GIT no such identity: id_rsa: No such file or directory
body: <p>I create a repository on github and want to push my code, but got the following tips:</p>
  
  <pre><code>$ git push -u origin master
  no such identity: id_rsa: No such file or directory
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p><strong>But id_rsa file is exist</strong>, I tried to add id_rsa public key into my github setting again, and github told me this public has been used.</p>
  
  <pre><code>$ ls
  config      id_rsa      id_rsa.pub  known_hosts
  </code></pre>
  
  <p>this is my <code>.ssh/</code> folder</p>
  
  <p>config file contain serval git config to different git site. All used the same public key and they could work successfully.</p>
  
  <p>What I did:</p>
  
  <pre><code>$git init
  $git add .
  $git commit -m "first commit"
  $git remote add [my remote git repository address]
  $git push -u origin master
  // ....  error message
  </code></pre>
  
  <hr>
  
  <p>UPDATE:</p>
  
  <pre><code>$ git config core.sshCommand "ssh -v"
  $ git push -u origin master
  OpenSSH_7.9p1, LibreSSL 2.7.3
  debug1: Reading configuration data ~/.ssh/config
  debug1: ~/.ssh/config line 2: Applying options for github.com
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: /etc/ssh/ssh_config line 48: Applying options for *
  debug1: Connecting to github.com port 22.
  debug1: Connection established.
  debug1: identity file id_rsa type -1
  debug1: identity file id_rsa-cert type -1
  debug1: Local version string SSH-2.0-OpenSSH_7.9
  debug1: Remote protocol version 2.0, remote software version babeld-003ebee6
  debug1: no match: babeld-003ebee6
  debug1: Authenticating to github.com:22 as 'git'
  debug1: SSH2_MSG_KEXINIT sent
  debug1: SSH2_MSG_KEXINIT received
  debug1: kex: algorithm: curve25519-sha256
  debug1: kex: host key algorithm: rsa-sha2-512
  debug1: kex: server-&gt;client cipher: chacha20-poly1305@openssh.com MAC: &lt;implicit&gt; compression: none
  debug1: kex: client-&gt;server cipher: chacha20-poly1305@openssh.com MAC: &lt;implicit&gt; compression: none
  debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
  debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
  debug1: Host 'github.com' is known and matches the RSA host key.
  debug1: Found key in ~/.ssh/known_hosts:1
  debug1: rekey after 134217728 blocks
  debug1: SSH2_MSG_NEWKEYS sent
  debug1: expecting SSH2_MSG_NEWKEYS
  debug1: SSH2_MSG_NEWKEYS received
  debug1: rekey after 134217728 blocks
  debug1: Will attempt key: id_rsa  explicit
  debug1: SSH2_MSG_EXT_INFO received
  debug1: kex_input_ext_info: server-sig-algs=&lt;ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,rsa-sha2-512,rsa-sha2-256,ssh-dss&gt;
  debug1: SSH2_MSG_SERVICE_ACCEPT received
  debug1: Authentications that can continue: publickey
  debug1: Next authentication method: publickey
  debug1: Trying private key: id_rsa
  no such identity: id_rsa: No such file or directory
  debug1: No more authentication methods to try.
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>