5

Today I was going to execute git push from the vscode terminal and a dialog popup saying:

extension 'GitHub' wants to sign in using GitHub.

enter image description here

I've checked and turns out that I don't have any extension called GitHub installed on vscode.

The question is why this is showing for me? If I wanted to push using an extension I would not typing on terminal git push. Is vscode intercepting what I type in terminal?

Besides that it also opens a user/password dialog like this: enter image description here

This is invasive. Is there any way to disable this?

PS: I already uncheck GitHub Authentication from Settings: enter image description here

I'm using vscode for one year and this is the first thing that annoyed me. I like vscode very much and I don't want it to became an IDE. Features like this should be incremented by extentions.

PS2: I'm using vscode 1.50.0

Gama11
  • 31,714
  • 9
  • 78
  • 100
psylo
  • 176
  • 6
  • Does [this](https://stackoverflow.com/questions/52466989/how-to-change-git-user-in-visual-studio-code-or-even-in-command-line-permissio) answer your question? Not the same issue but related. Did you google this issue? [It is not new](https://www.google.com/search?hl=en&source=hp&ei=wm2UX-OdNZ6SjLsPkp2d-AM&q=%22extension+%27GitHub%27+wants+to+sign+in+using+GitHub%22). – Reg Edit Oct 24 '20 at 18:06
  • @RegEdit no, doesn't answer =/ [This question](https://stackoverflow.com/q/63740987/6934746) is very similar, but nobody answer. The problem is not why git asks password but why vscode is intercepting the terminal to get the password. I just want to use as if it were a normal terminal where the password should be typed in the terminal. – psylo Oct 24 '20 at 21:26
  • I was surprised when this interception happened to me while I was working via Remote-SSH in the vscode terminal. (I am new to both vscode & git.) Also surprised that push succeeded with simply user+password, I was expecting to have to set up personal access token. – Doochz Jan 01 '22 at 15:21

1 Answers1

4

This behaviour is built into VS Code, so you will see this prompt even if you do not have a GitHub extension installed:

Enabling authentication through GitHub happens when you run any Git action in VS Code that requires GitHub authentication, such as pushing to a repository that you're a member of or cloning a private repository. You don't need to have any special extensions installed for authentication; it is built into VS Code so that you can efficiently manage your repository. When you do something that requires GitHub authentication, you'll see a prompt to sign in

You can use a separate Windows command prompt to avoid VS Code intercepting your commands.

EDIT If you prefer to use VS Code terminal for git commands without the interception, then as HolyBlackCat helpfully points out, there is now a setting to disable this behaviour.

"github.gitAuthentication": false,

Any git authentication prompts will then occur outside VS Code.

Reg Edit
  • 6,719
  • 1
  • 35
  • 46
  • Can't check right now, but I thought `"github.gitAuthentication": false` disables this? – HolyBlackCat Oct 25 '20 at 20:44
  • @HolyBlackCat you are right, just tried it and it works--that is great news and I've updated my answer to include this. – Reg Edit Oct 25 '20 at 21:57
  • 1
    `"github.gitAuthentication": false,` does not work for me (when using more complex toolchain in the VSCode CLI). It still asks for login/password. Version: 1.53.0 @ macOS Big Sur – vol Feb 09 '21 at 12:29