dotnet/vscode-dotnet-runtime

gitignore not working after enabling the extension

dpalmetzvbg opened this issue · 7 comments

Describe the bug.

After enabling the extension the global gitignore-file, which worked properly before, does not work anymore. There are many untracked files, that should not be tracked and are listed in the global gitignore-file. Also the python-language server shows some errors in the logfile.
git itsself does not show any errors in the logfiles. After disabling the extension the gitignorefile works properly again.

I am using a .env-File for my python environment.

Please attach log file(s) here if you have any.

Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'The log file location should be copied to your clipboard if you came from VS Code.

Reproduction Steps

open vscode
open the project folder
enable the extension
open the git-panel

Expected Behavior

The gitignore-file should work properly and there should not be additional untracked files.

Exceptions & Errors (if any)

No response

.NET Install Tool Version

2.0.3

Your operating system? Please provide more detail, such as the version and or distro above.

Windows

VS Code Version

1.89.0

I have fixed the python-error, but the gitignore problem still exists.

It also seems to effect git in some other ways. When activated the extension I no longer can push commits to my remote repository, I get an error: permission denied (publickey). When disabling the extension, everything works fine again.

I found the reason why this happens: I am in an centrally managed enterprise-environment, and my Home-Folder is, e.g., J:\ and not C:\Users<myuser>.
So my .ssh, .gitconfig and .gitignore reside on J::
I have no environment-variable HOME set.
When enabling this extension and opening a shell for a pod, an environment-variable HOME is created, which points to C:\Users<myuser>
This seems to cause the problem. When I move my files there, everything works fine. It also does not help to set an environment-variable "HOME" in windows and point it to J:. The extension still creates its own HOME-Variable that points to C:\Users<bkor>.
As I pointed out, I am in a centrally controlled enterprise-environemnt, and the configuration, where the ssh-files and git-configuration files are stored is not up to me. And always copying files to my user-folder is not a possible solution.

Thanks for the investigation - we can check into why HOME is set on our end.