git-credential-manager
git-credential-manager copied to clipboard
WSL - Opening Documents window instead of authentication prompt - xdg-open issue
Version
2.4.1+dc5101f53b9e3d9b6ee4af6e3537e87efc604480
Operating system
Other - please describe below
OS version or distribution
WSL (Arch) + Windows 11
Git hosting provider(s)
Other - please describe below
Other hosting provider
github, local gitea, etc... any that use OAuth
(Azure DevOps only) What format is your remote URL?
None
Can you access the remote repository directly in the browser?
Yes, I can access the repository
Expected behavior
GCM installed+configured in WSL instance, expect it to open a browser window to login
Actual behavior
Windows Explorer opens my Documents folder
Logs
This is actually an issue with xdg-open's WSL-specific handler calling explorer.exe to try and open the oauth URL. Explorer.exe can't/won't open URLs with equal signs in them. I've submitted an issue to xdg-open here that includes a fix.
I guess if your WSL instance doesn't use xdg-open (Ubuntu doesn't instal xdg-utils by default) then you won't run into this. I'm creating an issue here to track, mostly because I imagine others will get bit by this and come here wondering why it's happening. I'm fine if gcm project maintainers want to close this issue immediately (it'll still show up in google search results) or I can close it if/when the xdg-open fix is merged/released.