dotnet / vscode-dotnet-runtime

VSCode Extension for Installing .NET via VS Code
MIT License
128 stars 230 forks source link

gitignore not working after enabling the extension #1795

Open dpalmetzvbg opened 1 month ago

dpalmetzvbg commented 1 month ago

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

dpalmetzvbg commented 1 month ago

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

dpalmetzvbg commented 1 month ago

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.

dpalmetzvbg commented 1 month ago

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\. 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\ 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\. 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.

baronfel commented 1 month ago

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

BrianL-STCU commented 1 month ago

It looks like this may be the same issue as #1400, #1686, and #1707, which has been going on for most of a year. There are extensions that rely on this one that I just can't use if I want to also use the git integration.