title: Update command-line Git credential.helper for Personal Access Tokens (PAT) on GitHub
body: <p>I have several repositories which I was apparently using a cached version of password authentication to GitHub. I learned this only recently because GitHub stopped supporting passwords and instead required Personal Access Tokens (PAT) or SSH keys.</p>
  <p>I would get the following message for all private repositories on pull or push:</p>
  <pre><code>remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
  remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
  fatal: unable to access 'https://github.com/villano-lab/CEvNS.git/': The requested URL returned error: 403
  </code></pre>
  <p>I sort of solved this problem by looking at <a href="https://stackoverflow.com/questions/15381198/remove-credentials-from-git">this</a> post. From that information I inferred that I should check my parameter <code>credential.helper</code>. By doing:</p>
  <pre><code>git config --list
  </code></pre>
  <p>I found that it was set to &quot;store&quot; like this:</p>
  <pre><code>credential.helper=store
  </code></pre>
  <p>So what I did was set it like this:</p>
  <pre><code>git config credential.helper &quot;&quot;
  </code></pre>
  <p>What this did was allow me to enter my username and password again (and not have it supplied by the git client in a tacit way). Then I was able to <a href="https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token" rel="nofollow noreferrer">create a GitHub Personal Access Token</a> and use that inside the password field and the new GitHub requirements were satisfied and I didn't get the error.</p>
  <p>The question is, how do I make that permanent? Like, how do I put the PAT into the git client cache so I don't have to type it again like before? As of now if I go back to:</p>
  <pre><code>git config credential.helper store
  </code></pre>
  <p>it will go back to the old password and GitHub will refuse it.</p>