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?
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?
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.
Go to File > Prefrences > Settings (ctrl + ,) and search for: gitAuthentication
Uncheck both of these settings:
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
}
It took me a while to find this as I experienced the same annoying thing which, in some cases, when multiple project were open, would drive the CPU to high loads. Anyway....
Go to settings (shift+CMD+P MacOS) and search github authentication. Remove the checkbox for Controls ... enable automatic Github authentication.. and VSCode should stop popping up the Github/Microsoft login.