You are trying to use git from a terminal in vscode.
The problem comes from the authentication handler of vscode.
To solve the problem:
- Open vscode File > Preferences > Settings
- Search for git.terminalAuthentication
- Uncheck the option
You have to re-open the terminal to make it work.
As of March 2022, the menus have changed a bit. Here’s an illustration of how to access them:

