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.
I would get the following message for all private repositories on pull or push:
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
I sort of solved this problem by looking at this post. From that information I inferred that I should check my parameter credential.helper
. By doing:
git config --list
I found that it was set to "store" like this:
credential.helper=store
So what I did was set it like this:
git config credential.helper ""
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 create a GitHub Personal Access Token and use that inside the password field and the new GitHub requirements were satisfied and I didn't get the error.
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:
git config credential.helper store
it will go back to the old password and GitHub will refuse it.