Skip to content

Instantly share code, notes, and snippets.

@Ambratolm
Last active August 15, 2021 01:30
Show Gist options
  • Save Ambratolm/df3e866dbc3c7fe060e838d13a72f2cc to your computer and use it in GitHub Desktop.
Save Ambratolm/df3e866dbc3c7fe060e838d13a72f2cc to your computer and use it in GitHub Desktop.
Replace Git credential (Username and Password) on Windows with the new one (Username and Personal Access Token).
REM Step 1: Remove old credential
REM Execute these commands:
git credential-manager reject https://github.com
git config --global credential.helper manager-core
REM Step 2: Enter new credential
REM 1- Choose any repository you have on your machine and try to push it.
REM 2- One or more prompt windows will popup asking for credential: Personal Access Token (PAT), Username, and Password.
REM 3- Enter: PAT, Username, and if asked for password always enter PAT instead.
REM 4- Done. Credential saved and the push should be successful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment