'git clone from windows to wsl fails with: "fatal: could not create work tree dir '<path to repo in wsl>': Permission denied"

im using github desktop, for that reason my git project in wsl are managed by the git for windows, lately I was prompt to update git and now I get "fatal: could not create work tree dir '< path to repo in wsl >': Permission denied" when I try to clone a repo.

it does not seems to be an actual linux permission problem as even chmod 777 -R did not help.

what is the problem and how can I fix it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source