Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple WSL distro support #127

Closed
dixydo opened this issue May 3, 2022 · 5 comments
Closed

Multiple WSL distro support #127

dixydo opened this issue May 3, 2022 · 5 comments

Comments

@dixydo
Copy link

dixydo commented May 3, 2022

Hi! I have two Ubuntu WSL distro: Ubuntu and Ubuntu-20.04 for personal and working purposes respectively.
I set git executable in PhpStorm as C:\Users\yevhe\bin\wslgit.exe and git integration works fine with Ubuntu, but not with Ubuntu-20.04. It returns error Error updating changes: not a git repository (or any of the parent directories): .git

Is it possible to get both of them working properly? If yes — how?

UPD: I have tried to download source code, replace Ubuntu-20.04 with Ubuntu and compile two different versions, but still no luck.

@andy-5
Copy link
Owner

andy-5 commented Jun 22, 2022

wslgit uses the default WSL distribution, which you can set via wsl --set-default, see https://docs.microsoft.com/en-us/windows/wsl/basic-commands#set-default-linux-distribution .

There is currently no way to use wslgit with multiple distributions at the same time.

@carlolars
Copy link
Contributor

The problem is that wslgit always use the default wsl, so when accessing the filesystem from windows on another wsl instance the paths will translate to a Unix-path that exists on the other wsl instance, but wslgit will then run in the default instance where that path likely doesn't exist.

I'll push a PR soon that should make it possible to use wslgit with multiple distros, you just have to make sure git/ssh is setup correctly in all distros you intend to access repos in :)

@andy-5
Copy link
Owner

andy-5 commented Jul 14, 2022

@dixydo There is now an alpha build available with the changes from @carlolars :
https://ci.appveyor.com/project/andy-5/wslgit/build/artifacts

Does this work for your use case?

@dixydo
Copy link
Author

dixydo commented Jul 14, 2022

@andy-5 Thank you! Unfortunately I haven't possibility to test it right now as I'he already switched to single distro and route ssh config to repos manually to be able use your tool. I will try to test it on weekend.

@andy-5
Copy link
Owner

andy-5 commented Dec 30, 2022

The changes have no been released as wslgit v1.2.0.

@andy-5 andy-5 closed this as completed Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants