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:
- Clone a repository
- Cd into the directory and run
git config user.name and git config --global user.name to confirm it has the right username
- Make some changes (with or without new branch)
- Commit using vscode
- Check the author of the commit (e.g. with the git history extension)
Does this issue occur when all extensions are disabled?: Yes
Both
git config user.nameandgit config --global user.nameshow 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 usernamein that directory before committing.It uses the correct username when committing via the console.
Steps to Reproduce:
git config user.nameandgit config --global user.nameto confirm it has the right usernameDoes this issue occur when all extensions are disabled?: Yes