I set up my personal access token three days ago and GitHub still does not recognize it. I can log in using the randomly generated token. I can also pull repos. But when I try to push changes, error messages say that GitHub is trying to use password authentication. I wonder whether there is some undocumented extra step I need to take to get my personal access token used. Many other people are being blocked by the new authentication, but the scenarios I’ve found in online forums don’t match mine.
How are you using the token, e.g. in an IDE or something like Fork, or CLI?
Thanks for replying. I installed the command-line Git on a mac (not a great version of Git, I sense). And I’m running “git push” on the command line.
I can think of 2 things:
- The PAT does not have write access, or
- Your git configuration for the repo is not using HTTPS (Personal access tokens can only be used for HTTPS Git operations), i.e. the repo is using a SSH remote URL.
These can help you see potential issues…
More info of your repo’s git configuration:
git config --local --list
More info on the attempted push:
git push -v
I recommend using SSH keys instead anyways. If interested, checkout some instructions.
Also, you may want to check this out.
Thanks again. “git push” with the “-v” option acted differently in one way: it asked for a username and password and then rejected the push. Using my PAT as the password didn’t help. As for the URL, I checked the .git/config file for the repo and saw:
url = https://github.com/.…
You’ve been very helpful. I’m sure I registered an SSH key some time ago, but none was in GitHub now. So I added an SSH key. Now I’m using SSH and I’ve gotten a little further than HTTPS did. I have to talk now to the owner of the repo.