Skip to content

VSCode uses wrong username in commit despite 'git config user.name' showing the correct one #70044

@mYnDstrEAm

Description

@mYnDstrEAm

Both git config user.name and git config --global user.name show the correct username in the source code directory. However when I commit using Visual Studio Code it has my computer-username and not the git username.
It does not prompt me for my git username nor does it show any message related to the username. I can't find any option within VSCode to set/select my username. I have the same problem when cloning via SSH instead of HTTPS.
The only thing that worked was running git config user.name username in that directory before committing.

It uses the correct username when committing via the console.

  • VSCode Version: 1.32.0
  • OS Version: Debian 9

Steps to Reproduce:

  1. Clone a repository
  2. Cd into the directory and run git config user.name and git config --global user.name to confirm it has the right username
  3. Make some changes (with or without new branch)
  4. Commit using vscode
  5. Check the author of the commit (e.g. with the git history extension)

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    gitGIT issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions