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.
You can find the sign out option by clicking the profile icon in the bottom left corner:

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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With