title: Permission denied with mutiple github accounts
body: <p>I'm trying to set up personal git account along with my work account. I followed this guide <a href="https://www.freecodecamp.org/news/manage-multiple-github-accounts-the-ssh-way-2dadc30ccaca/" rel="nofollow noreferrer">https://www.freecodecamp.org/news/manage-multiple-github-accounts-the-ssh-way-2dadc30ccaca/</a>
  and my ~/.ssh/config is (some-name is my user name for personal github account)</p>
  
  <pre><code>host github.com
     Hostname github.com
     User git
     AddKeysToAgent yes
     UseKeychain yes
     IdentityFile ~/.ssh/id_rsa
  host some-name.github.com
     Hostname github.com
     Identityfile ~/.ssh/id_rsa_personal
  </code></pre>
  
  <p>After this, I ran <code>ssh-add ~/.ssh/id_rsa_personal</code> which was successful. </p>
  
  <p>However, when I do <code>ssh -T some-name.github.com</code>, it fails with 
  <code>somename@github.com: Permission denied (publickey)</code>
  The work account is working fine. I also uploaded newly generated public key on github account.</p>
  
  <p>My git config --list shows user.name=some-name. </p>
  
  <p><strong>update</strong>: based on VonC's response, I was able to get <code>ssh -T some-name.github.com</code> to run successfully. However, I am still getting following error when I try to push code into a repo in github account.</p>
  
  <pre><code>ERROR: Permission to some-name/docker-react.git denied to User.
  fatal: Could not read from remote repository.
  </code></pre>
  
  <p>I checked the ssh keys uploaded on github, and it is correct.</p>