title: Clone, add and commit to private repository on github on macosx
body: <p>I am trying to clone, add some code to and commit the code to my private repository on Github. The issue is that whenever I do</p>
  
  <pre><code>git clone https://github.com/my-username/my-Repo.git
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>remote: Invalid username or password.
  fatal: Authentication failed for 'https://github.com/.../my_repo.git/'
  </code></pre>
  
  <p>I didn't have this issue before executing the following command</p>
  
  <pre><code>git credential-osxkeychain erase
  </code></pre>
  
  <p>Before executing above command I managed to clone the repo by using my personal access token, managed to execute <code>git init</code>, <code>git add blah.py</code> and <code>git push</code> without any issues but nothing showed up on my github page.</p>
  
  <p>Now, after removing the credentials from my keychain, when I enter the CORRECT username and password when cloning my private Github repository I get the <code>remote: Invalid username or password.</code> error. I've both manually written my username and password into the terminal and copied from <code>saved logins</code> on firefox, neither works and I know the username and password is correct since I can easily login to my Github account on github.com with the same information I enter into the terminal when attempting to clone my repo. Using the e-mail does not change the "invalid ..." error.</p>
  
  <p>tl;dr How do you control a private repository on macosx via terminal?</p>
  
  <p>Edit: I use 2FA</p>