GitHub now requires token-based authentication to call their APIs, and in the future, use Git itself.
This means Git credential helpers such as Git Credential Manager (GCM) for Windows, and old versions of GCM that offer username/password flows will not be able to create new access tokens for accessing Git repositories.
If you already have tokens generated by Git credential helpers like GCM for Windows, they will continue to work until they expire or are revoked/deleted.
The best thing to do right now is upgrade to the latest Git for Windows (at least version 2.29), which includes a version of Git Credential Manager that uses supported OAuth token-based authentication.
Download the latest Git for Windows ⬇️
Please update to the latest supported release of Visual Studio, that includes GCM and support for OAuth token-based authentication.
If you are using SSH this change does not affect you.
If you are using an older version of Git Credential Manager (before 2.0.124-beta) please upgrade to the latest version following these instructions.
If you are unable to upgrade Git for Windows, you can manually install Git Credential Manager as a standalone install. This will override the older, GCM for Windows bundled with the Git for Windows installation.
Download Git Credential Manager standalone ⬇️
If you are unable to use Git Credential Manager due to a bug or compatibility issue we'd like to know why!
If you do not have permission to change your installation (for example in a
corporate environment) you can use the per-user installer. Check out the latest
release and download the gcmcoreuser-win-*.exe
executable.
There is a workaround which should work and doesn't require installing anything.
-
Tell your system administrator they should start planning to upgrade the installed version of Git for Windows to at least 2.29! 😁
-
Create a new personal access token (see official documentation)
-
Enter a name ("note") for the token and ensure the
repo
,gist
, andworkflow
scopes are selected: ... ... ... -
Click "Generate Token"
-
[IMPORTANT] Keep the resulting page open as this contains your new token (this will only be displayed once!)
-
Save the generated PAT in the Windows Credential Manager:
-
If you prefer to use the command-line, open a command prompt (cmd.exe) and type the following:
cmdkey /generic:git:https://github.com /user:PersonalAccessToken /pass
You will be prompted to enter a password – copy the newly generated PAT in step 4 and paste it here, and press the
Enter
key -
If you do not wish to use the command-line, open the Credential Manager via Control Panel and select the "Windows Credentials" tab.
Click "Add a generic credential", and enter the following details:
- Internet or network address:
git:https://github.com
- Username:
PersonalAccessToken
- Password: (copy and paste the PAT generated in step 4 here)
- Internet or network address:
-
As mentioned in the blog post, the new token-based authentication requirements DO NOT apply to GHES:
We have not announced any changes to GitHub Enterprise Server, which remains unaffected at this time.