why does vscode intercepts git push command on terminal?

你。 提交于 2021-01-05 07:39:08

问题


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.

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:

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

PS: I already uncheck GitHub Authentication from Settings:

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


回答1:


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.



来源:https://stackoverflow.com/questions/64516243/why-does-vscode-intercepts-git-push-command-on-terminal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!