Terminal is recognizing PAT as a password and not a token

Viewed 170

I went through the process of creating a PAT on GitHub. I'm trying to run a gitpushcommand. However, whenever I enter the PAT into the terminal when prompted:

Username for 'https://github.com': USERNAME Password for 'https://USERNAME@github.com':

I receive the following messages:

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: Authentication failed for 'https://github.com/johnnag94/Cour-test.git/'

Which are the same messages I received when I was prompted to create a personal access token, which leads me to believe that my terminal thinks I'm entering a password instead of the token. I've tried creating several tokens, and have tried exiting out of my terminal. I also tried adding my github password and username to my windows credentials manager (saw it in a similar question) and it's still responding with the same three messages.

I'm really new at this.

1 Answers

You probably did what I did - you double-clicked the token to select it. Unfortunately, on Windows, this also selects the whitespace at the end of the password. Either click the copy button or make sure to remove the space when you paste the token.

This token has been removed before the answer was published.

There space here

Related