title: Git pushing to remote GitHub repository as wrong user
body: <p>I have a work GitHub account and a personal one. First I used the personal one for test projects, then I moved on and did a repository with the other account on the same computer.</p>
  
  <p>Now I wanted to create a new repository on my personal account again, I changed the global and local <code>user.name</code>, and did a new ssh key pair, entered in the GitHub setup page. Then I set up the directory</p>
  
  <pre><code>git init
  git remote add origin &lt;url&gt;
  git push origin
  </code></pre>
  
  <p>but that now tells me</p>
  
  <blockquote>
    <p>ERROR: Permission to personaluser/newrepo.git denied to </p>
  </blockquote>
  
  <p>I have no idea how the other account is connected to this one. <code>.git/config</code> shows no <code>workusername</code> related things.</p>
  
  <p><em>If you're using Windows 10 take your time to read the Rajan's answer.</em></p>