0
votes

I'm trying to update my git settings (on macOS Big Sur) to use a personal access token for GitHub, instead of a username and password.

I have followed all the instructions and installed the osxkeychain helper. Then:

 git config --global credential.helper osxkeychain

The next time you clone an HTTPS URL that requires authentication, Git will prompt you for your username and password. When Git prompts you for your password, enter your personal access token (PAT) instead.

Sadly, these instructions seem incorrect. Git keeps using my name and password and doesn't ask for the new Personal Access Token. How can I fix this?

1
When Git prompts you for your password, enter your personal access token (PAT) instead. It's clear enough.iBug
Yes, but that doesn't happen... that's why I posted this question 😬Kokodoko

1 Answers

2
votes

It's likely that you were already using this credential manager, since it's the default for most distributions of macOS and your password is already saved.

To remove the password in your credential manager so you'll be prompted again, follow the directions outlined in the Git FAQ:

$ echo url=https://[email protected] | git credential reject

You will of course want to replace my username with yours.