Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to sign out github account in vs code

In VS code, I am signed in with a github account in which I have no longer my access. So I need to completely unlink the github account from vs code. How can I do that? I am using ubuntu.

like image 460
Newaj Avatar asked Dec 06 '25 15:12

Newaj


2 Answers

You can find the sign out option by clicking the profile icon in the bottom left corner:

image

like image 136
mehtaarn000 Avatar answered Dec 08 '25 08:12

mehtaarn000


Answer for VS Code version 1.76.2.

I was only able to sign out of my Github account by totally uninstalling Visual Studio Code and reinstalling it. It was a very quick process as I first made copies of (I'm on a mac):
~/Library/Application Support/Code/User/keybindings.json
~/Library/Application Support/Code/User/settings.json
and all extensions in
~/.vscode/extensions

The reason I needed this was I signed up for GitHub Copilot and was getting the error

Your GitHub token is invalid. Please sign out from your GitHub account using VSCode UI and try again.

but I could not figure out how to do this. I tried deleting all caches and anything with the name Github in it in:
~/Library/Application Support/Code
~/.vscode
but still this did not work and I had to resort to the nuclear option stated above.

After the fresh install I was successfully disconnected from my Github account and I was then able to get Copilot to authenticate correctly by signing in fresh to my Github account.

like image 23
BigHeadCreations Avatar answered Dec 08 '25 07:12

BigHeadCreations



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!