vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Make sure you configure your "user.name" and "user.email" in git.

Open DanJBower opened this issue 1 year ago • 1 comments

Issue Description

The C# VS Code extension seems to be interfering with my ability create a git commit in the "Source Control" tab of VS Code. When I click commit, I get met with the error "Make sure you configure your "user.name" and "user.email" in git" in a popup window.

This only happens on git repositories that were cloned over SSH instead of HTTPS.

I disabled all my extensions and enabled them one by one to highlight which was causing the issue. With all my extensions enabled, apart from the C# extension, everything works fine.

I switched back to version 1.26.0 and it worked fine. I tried several other 2.x versions but they all seemed to raise the same error.

My "user.name" and "user.email" are set globally and commit from command line still works.

Environment information

VSCode version: 1.85.1 C# Extension: 1.26.0 Using OmniSharp: false

Dotnet Information .NET SDK: Version: 7.0.102 Commit: 4bbdd14480

Runtime Environment: OS Name: Windows OS Version: 10.0.19045 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.102\

Host: Version: 7.0.2 Architecture: x64 Commit: d037e070eb

.NET SDKs installed: 7.0.102 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET: https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
ada AdaCore 24.0.3 adacore.ada-24.0.3
azure-account ms-vscode 0.11.6 ms-vscode.azure-account-0.11.6
black-formatter ms-python 2023.6.0 ms-python.black-formatter-2023.6.0
code-spell-checker streetsidesoftware 3.0.1 streetsidesoftware.code-spell-checker-3.0.1
compare-folders moshfeu 0.24.1 moshfeu.compare-folders-0.24.1
cpptools ms-vscode 1.18.5 ms-vscode.cpptools-1.18.5-win32-x64
crates serayuzgur 0.6.5 serayuzgur.crates-0.6.5
csharp ms-dotnettools 1.26.0 ms-dotnettools.csharp-1.26.0-win32-x64
debug webfreak 0.26.1 webfreak.debug-0.26.1
DXL aboulaaouane 0.1.1 aboulaaouane.dxl-0.1.1
EditorConfig EditorConfig 0.16.4 editorconfig.editorconfig-0.16.4
even-better-toml tamasfe 0.19.2 tamasfe.even-better-toml-0.19.2
fabric8-analytics redhat 0.9.1 redhat.fabric8-analytics-0.9.1
factoriomod-debug justarandomgeek 1.1.39 justarandomgeek.factoriomod-debug-1.1.39
flake8 ms-python 2023.11.13551006 ms-python.flake8-2023.11.13551006
flutter Dart-Code 3.58.0 dart-code.flutter-3.58.0
git-diff-and-merge-tool david-rickard 1.0.5 david-rickard.git-diff-and-merge-tool-1.0.5
git-file-history pomber 1.0.1 pomber.git-file-history-1.0.1
git-graph mhutchie 1.30.0 mhutchie.git-graph-1.30.0
git-project-manager felipecaputo 1.8.2 felipecaputo.git-project-manager-1.8.2
git-tree-compare letmaik 1.16.0 letmaik.git-tree-compare-1.16.0
gitblame waderyan 10.6.0 waderyan.gitblame-10.6.0
githistory donjayamanne 0.6.20 donjayamanne.githistory-0.6.20
gitlens eamodio 14.6.1 eamodio.gitlens-14.6.1
graphviz-preview EFanZh 1.6.4 efanzh.graphviz-preview-1.6.4
hexeditor ms-vscode 1.9.12 ms-vscode.hexeditor-1.9.12
highlight-matching-tag vincaslt 0.11.0 vincaslt.highlight-matching-tag-0.11.0
ide-vscode dafny-lang 3.2.2 dafny-lang.ide-vscode-3.2.2
intellicode-api-usage-examples VisualStudioExptTeam 0.2.8 visualstudioexptteam.intellicode-api-usage-examples-0.2.8
isort ms-python 2023.10.1 ms-python.isort-2023.10.1
jupyter ms-toolsai 2023.11.1003402403 ms-toolsai.jupyter-2023.11.1003402403-win32-x64
jupyter-keymap ms-toolsai 1.1.2 ms-toolsai.jupyter-keymap-1.1.2
jupyter-renderers ms-toolsai 1.0.17 ms-toolsai.jupyter-renderers-1.0.17
language-julia julialang 1.65.2 julialang.language-julia-1.65.2
language-matlab MathWorks 1.1.5 mathworks.language-matlab-1.1.5
lua sumneko 3.7.4 sumneko.lua-3.7.4-win32-x64
markdown-preview-enhanced shd101wyy 0.8.11 shd101wyy.markdown-preview-enhanced-0.8.11
markdown-table-rainbow yoshi389111 1.0.2 yoshi389111.markdown-table-rainbow-1.0.2
markdowntable TakumiI 0.11.0 takumii.markdowntable-0.11.0
material-icon-theme PKief 4.32.0 pkief.material-icon-theme-4.32.0
npm-intellisense christian-kohler 1.4.5 christian-kohler.npm-intellisense-1.4.5
overtype DrMerfy 0.5.0 drmerfy.overtype-0.5.0
pdf tomoki1207 1.2.2 tomoki1207.pdf-1.2.2
perl-toolbox d9705996 1.4.0 d9705996.perl-toolbox-1.4.0
perlcritic sfodje 1.3.8 sfodje.perlcritic-1.3.8
plantuml jebbs 2.17.5 jebbs.plantuml-2.17.5
powershell ms-vscode 2023.8.0 ms-vscode.powershell-2023.8.0
pretty-formatter mblode 0.2.4 mblode.pretty-formatter-0.2.4
prettyxml PrateekMahendrakar 3.8.0 prateekmahendrakar.prettyxml-3.8.0
pylint ms-python 2023.10.1 ms-python.pylint-2023.10.1
python ms-python 2023.22.1 ms-python.python-2023.22.1
rainbow-csv mechatroner 3.10.0 mechatroner.rainbow-csv-3.10.0
regionfolder maptz 1.0.22 maptz.regionfolder-1.0.22
remote-containers ms-vscode-remote 0.329.0 ms-vscode-remote.remote-containers-0.329.0
remote-wsl ms-vscode-remote 0.81.8 ms-vscode-remote.remote-wsl-0.81.8
rust-analyzer rust-lang 0.3.1791 rust-lang.rust-analyzer-0.3.1791-win32-x64
rust-syntax dustypomerleau 0.6.1 dustypomerleau.rust-syntax-0.6.1
svg jock 1.5.3 jock.svg-1.5.3
test-adapter-converter ms-vscode 0.1.8 ms-vscode.test-adapter-converter-0.1.8
todo-tree Gruntfuggly 0.0.226 gruntfuggly.todo-tree-0.0.226
trailing-spaces shardulm94 0.4.1 shardulm94.trailing-spaces-0.4.1
vsc-python-indent KevinRose 1.18.0 kevinrose.vsc-python-indent-1.18.0
vscode-commons redhat 0.0.6 redhat.vscode-commons-0.0.6
vscode-data-preview RandomFractalsInc 2.3.0 randomfractalsinc.vscode-data-preview-2.3.0
vscode-diff-viewer caponetto 1.5.0 caponetto.vscode-diff-viewer-1.5.0
vscode-docker ms-azuretools 1.28.0 ms-azuretools.vscode-docker-1.28.0
vscode-dotnet-runtime ms-dotnettools 2.0.0 ms-dotnettools.vscode-dotnet-runtime-2.0.0
vscode-edge-devtools ms-edgedevtools 2.1.3 ms-edgedevtools.vscode-edge-devtools-2.1.3
vscode-edit-csv janisdd 0.8.3 janisdd.vscode-edit-csv-0.8.3
vscode-firefox-debug firefox-devtools 2.9.10 firefox-devtools.vscode-firefox-debug-2.9.10
vscode-github-actions github 0.26.2 github.vscode-github-actions-0.26.2
vscode-icons vscode-icons-team 12.6.0 vscode-icons-team.vscode-icons-12.6.0
vscode-java-debug vscjava 0.55.0 vscjava.vscode-java-debug-0.55.0
vscode-java-dependency vscjava 0.23.3 vscjava.vscode-java-dependency-0.23.3
vscode-java-pack vscjava 0.25.15 vscjava.vscode-java-pack-0.25.15
vscode-jupyter-cell-tags ms-toolsai 0.1.8 ms-toolsai.vscode-jupyter-cell-tags-0.1.8
vscode-jupyter-slideshow ms-toolsai 0.1.5 ms-toolsai.vscode-jupyter-slideshow-0.1.5
vscode-kubernetes-tools ms-kubernetes-tools 1.3.15 ms-kubernetes-tools.vscode-kubernetes-tools-1.3.15
vscode-markdownlint DavidAnson 0.53.0 davidanson.vscode-markdownlint-0.53.0
vscode-maven vscjava 0.43.0 vscjava.vscode-maven-0.43.0
vscode-pets tonybaloney 1.22.0 tonybaloney.vscode-pets-1.22.0
vscode-proto3 zxh404 0.5.5 zxh404.vscode-proto3-0.5.5
vscode-pull-request-github GitHub 0.78.1 github.vscode-pull-request-github-0.78.1
vscode-pylance ms-python 2023.12.1 ms-python.vscode-pylance-2023.12.1
vscode-scss mrmlnc 0.10.0 mrmlnc.vscode-scss-0.10.0
vscode-taskexplorer spmeesseman 2.13.2 spmeesseman.vscode-taskexplorer-2.13.2
vscode-todo-highlight wayou 1.0.5 wayou.vscode-todo-highlight-1.0.5
vscode-xml redhat 0.26.1 redhat.vscode-xml-0.26.1-win32-x64
vscode-yaml redhat 1.14.0 redhat.vscode-yaml-1.14.0
vscode-zipexplorer slevesque 0.3.1 slevesque.vscode-zipexplorer-0.3.1
vscodeintellicode VisualStudioExptTeam 1.2.30 visualstudioexptteam.vscodeintellicode-1.2.30
xml DotJoshJohnson 2.5.1 dotjoshjohnson.xml-2.5.1

DanJBower avatar Jan 05 '24 13:01 DanJBower

I'm having a similar problem. But it's hit and miss. Committing works most of the time, but then the error will apparently randomly pop up when trying to commit sometimes. If I simply shut down VS Code, immediately reopen it and try to commit again, it always works. I can't directly attribute the problem to C# VS Code extension, but I do have it installed (version 2.19.13).

prlcutting avatar Feb 24 '24 21:02 prlcutting