Skip to content

Instantly share code, notes, and snippets.

@andry81
Last active March 10, 2025 15:59
Show Gist options
  • Save andry81/4dc954fc98a84807195080c6d2c5bc72 to your computer and use it in GitHub Desktop.
Save andry81/4dc954fc98a84807195080c6d2c5bc72 to your computer and use it in GitHub Desktop.
GitHub credentials notable details and changes
  • github_credentials.md
  • 2025.03.10
  1. DESCRIPTION
  2. CREDENTIALS
    2.1. Windows Credential Manager

  1. DESCRIPTION

GitHub credentials notable details and changes.


  1. CREDENTIALS


2.1. Windows Credential Manager

Starting around the end of August 2024 the GitHub has changed the Git git: and https: protocols authentication based on a single record in the Windows Credential Manager panel.

Now is required 2 records instead of 1 as was before.

https://github.com/orgs/community/discussions/133133#discussioncomment-10443908

Otherwise the error is persist:

remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/USER/REPO/'

This happens because:

  1. credential.helper=wincred

  2. Windows Credential Manager has a single record:

Address: git:https://github.com
User: USER
Pass: PASS
Persistence: Enterprise

To fix this you must add the second record:

Address: git:https://[email protected]
User: USER
Pass: PASS
Persistence: Local computer

Warning

This must be with persistence Local computer, otherwise won't work!

Warning

This can not be added through the Windows Credential Manager nor cmdkey.exe utility.

Another fix would be to install the Git Credential Manager:
https://github.com/git-ecosystem/git-credential-manager

The installation does update Windows Credential Manager records once and changes the Git credential helper variable:

credential.helper=manager

Warning

The variable credential.helper=manager is required to update the Windows Credential Manager records on each Git command call within the Git authentication attempt.

Note

The Git Credential Manager adds and updates the second record automatically in the installation and after.

Note

If the GitHub PAT is expired, then Git Credential Manager automatically removes it from the Windows Credential Manager records list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment