Home > Blockchain >  Visual Studio 2022 shows git repo as "Untrusted"
Visual Studio 2022 shows git repo as "Untrusted"

Time:01-21

Visual Studio 2022 has started showing one of my git repos as "Untrusted". What does this mean? How can I fix it?

enter image description here

CodePudding user response:

This is a new security feature in Git to prevent people from sticking things into a shared git repo to infect your PC. It may have been a bit overboard, but now we'll have to deal with it in every tool on our PCs that use Git:

Why oh Why?

This change in Git came about due a security issue which allows parent repositories directories to override permissions of child repositories in some situations which would potentially allow execution of commands with unintended consequences. You can read more detail about the specific vulnerability here:

Git Security Issue: enter image description here

  • Change Folder Ownership. In the File System properties on your machine, change the owner of the directory to be your user.

  • For details see here.

    • Related