0

I want to add my GitHub account to Visual Studio.

enter image description here

When I click GitHub, this page shows up:

enter image description here

This is an another account. So, I don't want to use this account. I deleted everything from Settings->Developer Settings->OAuthApps-Github Apps-Personal Access Tokens

enter image description here

Also, I deleted Windows Credentials related to Github and Visual Studio from:

Control Panel\All Control Panel Items\Credential Manager

But still, when click to add GitHub account it redirects me to authorization page of another account. How should delete the another account and I add my account?

Mustafa
  • 37
  • 1
  • 7

1 Answers1

0

There are several way to do this.

either you can: GithubSite -> Login -> Settings -> Developer Settings -> Personal Access Token -> Delete (Token For that PC Name) -> click Agree (I Understand, delete this token)

or you can run this in the Visual Studio Code terminal: git config credential.helper Then Go to and delete the file C:\Users(your username).git-credentials or you can simply remove the @github user rows from the text file.

Then go to Windows password: Control Panel → All Control Panel Items → Credential Manager. The passwords are referenced to the GitHub label in generic.

Then log in into your GitHub account with your default browser. After that, restart Visual Studio Code. Clone from GitHub and follow the authorization steps from Visual Studio Code.

Divya Prakash
  • 898
  • 1
  • 6
  • 14
  • I had deleted everything inside Personal Access Token page already. (GithubSite -> Login -> Settings -> Developer Settings -> Personal Access Token already). There is no .git-credentials file in the disk (I searched using the command : `dir .git-credentials`). I had deleted everything related to Github in Credential Manager. I use Visual Studio instead of Visual Studio Code by the way. – Mustafa Sep 05 '22 at 16:03