Nodachisoft Nodachisoft logo, Katana Sword Icon
  
@Amaji✎ Update December-17-2021

How to resolve github authentication failure 'Could not authenticate to Git remote' in VSCode

How to resolve github authentication failure 'Could not authenticate to Git remote' in VSCode

Abstract

After a long time, I opened a VSCode project and the pull/push to github failed to authenticate. I've checked the steps to resolve the issue and will leave a note.

The error message is "Authentication Failed".

message on failure

The cause may be that the credentials on Windows are outdated.

2 way to solve it.

  1. Check and delete old credentials from the "command line".
  2. Check and delete the old credentials from "Control Panel".

Check and delete the old credentials from the command line.

Launch cmd.exe in administrator mode and type cmdkey /list to output the list of credentials.

We want to check the credentials with github.com from vscode, so you can put cmdkey /list:vscodevscode.github-authentication/github.authm.

Check
> cmdkey /list:vscodevscode.github-authentication/github.auth

Current stored credentials for git:https://github.com:

 Target: LegacyGeneric:target=vscodevscode.github-authentication/github.auth
 Type: Generic
 User: github.auth

Remove this authentication data.

Deleting
cmdkey /delete:vscodevscode.github-authentication/github.auth

CMDKEY: Credentials deleted successfully.

Check and delete old credentials from "Control Panel".

You can remove git credentials from the "Windows Credentials" section of the "Credentials Manager" in the Control Panel.

The Credentials Manager opens a command input dialog with the Win+r keys, and then displays a dialog with the command below:

cmd input dialog

type control.exe /name Microsoft.CredentialManager and open "Windows Credentials" window.

Credential Manager

By selecting Windows Credentials

List of credentials

Since "git:https://github.com" is in the list, check the contents and delete it.

Delete contents

After deleting the credentials

If you try to push from vscode again, a new github login screen will appear and you will need to enter the correct credentials. You can now access your github account by entering the correct credentials.

github re-login

Websites and references that were very helpful.

Page History

date modification
none
 
 
Message sent

Thank you for your message.

Something error has occured!

Sorry. The Error has occurred.We apologize for the inconvenience.Please try again in a few minutes or contact us via DM below.

Twitter:@NodachiSoft_eng
Name:
 
Replay To:
 
Message:
 
Back
Check the content!

Send the following information to us. If you are happy with your submission, please click "Send". If you want to modify it, please click "Back".

Name:
 
Reply To:
 
Message:
 
Enter a confirmation key to make sure that you are not operating from a Robot.
Confirmation Key is 95
Back
 / 
Go to Confirmation
Entry fields
Go to Confirmation

There are 3 articles that may be relevant!

Creating a comfortable development environment with Unity+VSCode

Creating a comfortable development environment with Unity+VSCode

#Unity#Vscode✎ 2021-12-26
Steps to create a development environment with Unity+VSCode. Required extension plugins and overview.
Table Of Contents
How to resolve github authentication failure 'Could not authenticate to Git remote' in VSCode
How to resolve github authentication failure 'Could not authenticate to Git remote' in VSCode
Abstract
Abstract
Check and delete the old credentials from the command line.
Check and delete the old credentials from the command line.
Check and delete old credentials from "Control Panel".
Check and delete old credentials from "Control Panel".
After deleting the credentials
After deleting the credentials
Websites and references that were very helpful.
Websites and references that were very helpful.
Page History
Page History
Nodachisoft © 2021