Open repo in WSL with Git Extensions

I cloned a repo in WSL in order to build an OpenWrt firmware, but I couldn’t open it with Git Extensions:

/open-repo-in-wsl-with-git-extensions/error.png

Even after clicking on the Trust this repository button, it still fails to open.

I fixed it by manually running this command:

1
git config --global --add safe.directory '%(prefix)///wsl.localhost/Ubuntu/home/kenny/immortalwrt-mt798x'

Reference:

https://github.com/gitextensions/gitextensions/issues/9954