Trouble setting up Personal Access Token

I am on Mac OSX. I believe I have set up my PAT properly, and I’ve run git config --global credential.helper osxkeychain. When I look in my git config, I see the following lines:

include.path=.gitcredential
diff.exif.textconv=exif
credential.helper=osxkeychain
user.name=<myusername>
user.email=63379656+<myusername>@users.noreply.github.com
credential.helper=osxkeychain

If I remove the old entry from my osx keychain (which contains my github password) I am prompted for a username/password combo, but when I enter my PAT into the password field (as instructed here, I think), I get remote: Invalid username or password. I also have

> curl https://api.github.com/user --header 'Authorization: Token'
{
  "message": "Bad credentials",
  "documentation_url": "https://docs.github.com/rest"
}

What am I doing wrong?

If your token does.not work with using the API it will.not work.on the Git command either.

curl -v -H “Authorization: token TOKEN” https://api.github.com/user

You can regenerate your token and try again if this is the case

.