Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable github login in vscode

I'm using vscode and git. But I don't want to publish my codes to github. VScode still keeps popping up a windows to ask me to login on github. How to disable this?

like image 944
Neo Avatar asked Feb 22 '26 19:02

Neo


2 Answers

Go to File > Prefrences > Settings (ctrl + ,) and search for: gitAuthentication

Uncheck both of these settings:

  • Git: Terminal Authentication
  • Github: Git Authentication

This will stop the popup as well as stop prompting for a username/password when running git command from the terminal.

Alternatively, you can add these lines to your settings.json file:

{
    // ...
    "github.gitAuthentication": false,
    "git.terminalAuthentication": false
}
like image 102
John Pope Avatar answered Feb 24 '26 07:02

John Pope


While reading the link in the first comment, I saw this:

// When enabled, commits will automatically be fetched from the default remote of the current Git repository.
"git.autofetch": false,

I looked through Settings > Extensions > Git and saw Autofetch was enabled with a blue line, indicating it was not the default setting. I reset it and now I don't get popup anymore.

The reason I was getting the popup is because my repositories are private, and the login windows aren't "saving" my login, so every 180 seconds from launch, VSCode would try to access my online gits then get denied and ask me to login for each repository again.

like image 40
Megame Avatar answered Feb 24 '26 08:02

Megame



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!