You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When monitoring a repository stored inside a WSL2 instance, CMD.EXE is launched with a UNC path which is not supported. Even after choosing Windows Terminal as the shell under Options -> Integrations this still occurs.
Version & OS
Github Desktop: 2.9.11 (x64)
OS: Windows 10 Pro 19042.685
Steps to reproduce the behavior
Have a repo with a pre-commit hook (or any commit hook, my repo has some husky hooks for instance)
Make a commit
Push commit
See error
Expected behavior
Commit hooks run without any issues
Actual behavior
CMD.EXE fails as it doesn't support UNC paths.
Additional context
I think one of the following options needs to be adopted
Github Desktop should default to a terminal that supports UNC paths
Github Desktop should use the shell that is specified in the shell integration, or more control over which shell is launched when using Windows Terminal integration. However, WSL2/Ubuntu is set as the default profile for my Windows Terminal so I am not sure if Github Desktop is honouring this of if it is still just launching Command Prompt inside of Windows Terminal, of if it just ignoring this setting altogether
this would be really nice.. struggling with the same issue.
Allowing to use UNC paths (i.e., \\wsl$\...) would highly improve the developer experience when working with WSL2
I would argue that setting an, apparently, undocumented registry value (I am unable to find any documentation describing this value) is an undesirable solution to this problem. But as others have reported that it works and since I no longer use windows (so I am unable to verify this solution personally) I will mark this as closed.
Activity
johannesschobel commentedon Mar 24, 2022
this would be really nice.. struggling with the same issue.
Allowing to use UNC paths (i.e.,
\\wsl$\...) would highly improve the developer experience when working with WSL2johannesschobel commentedon May 4, 2022
Dear @Bidski , i have found a possible solution for this issue:
You need to manually create a new Windows registry key:
with the type
DWordand set the value to1.This will then disable the UNC Check for paths.
The solution worked for me, as i can not execute Husky GitHooks from within GitHub Desktop.
Hope this helps,
All the best,
CombesA commentedon Jun 8, 2022
This worked like a charm for me, thanks.
corps21 commentedon Aug 6, 2023
Thanks
Bidski commentedon Aug 6, 2023
I would argue that setting an, apparently, undocumented registry value (I am unable to find any documentation describing this value) is an undesirable solution to this problem. But as others have reported that it works and since I no longer use windows (so I am unable to verify this solution personally) I will mark this as closed.