hangxingliu / wslgit

:candy: Use Git installed in WSL(Windows Subsystem for Linux) from Windows and Visual Studio Code
GNU General Public License v3.0
150 stars 18 forks source link

[BUG] wslgit doesn't work anymore on Windows 10 Pro 1903 (18362.116) #14

Open ScarletFlash opened 5 years ago

ScarletFlash commented 5 years ago

Description After upgrading from Windows 10 1809 to Windows 10 1903 hangxingliu/wslgit does not work anymore.

Environment [System.Environment]::OSVersion.Version

[System.Environment]::OSVersion.Version:
Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      18362  0

wsl cat /etc/wsl.conf

[automount]
root = /
options = "metadata"

wsl mount -t drvfs

[automount]
C:\ on /c type drvfs (rw,noatime,uid=1000,gid=1000,metadata,case=off)
D:\ on /d type drvfs (rw,noatime,uid=1000,gid=1000,metadata,case=off)

https://github.com/andy-5/wslgit works well.

hangxingliu commented 5 years ago

Check later after finished my work.

But the way, have you update your wslgit.sh and git.bat to the latest version from this repo. because I commited a patch for Windows 19H1 last month

ScarletFlash commented 5 years ago

Yes, I have updated

hangxingliu commented 5 years ago

I will check on the Windows 10 Pro 1903 in the VM later. It seems like anything be changed in the system

hangxingliu commented 5 years ago

@ScarletFlash I have tested this project on Windows 10 1903. And everything works fine included using git.bat under command line and integration with VS Code.

Could you provide more information about the problem you met? Is the problem happened in integration with VS Code or integration with other software?

And if you can provide the following information to me will be better:

  1. The distro of your WSL (Eg. Ubuntu, Ubuntu 18.04, Arch, ...)
  2. The Unix path of your project using wslgit (Eg. /c/projects/example-project)
  3. Is the output of command wsl mount -t drvfs contains a line [automount]? (Because I saw this unexpected line in your issue body)
  4. The output from VS Code Git part if you are using wslgit with VS Code. you can find it in Output panel in VS Code.

Thanks

ScarletFlash commented 5 years ago

So, I've updated my personal laptop - wslgit works well on it. But on my office computer problem does still exist.

Anyway, both my machines have the same configuration:

  1. Ubuntu, installed from Microsoft Store, switched to latest releases and updated to the latest one - 19.04.
  2. Unix path is /c/Projects at my laptop and /d/Projects at my office machine.
  3. PS C:\Users\admin> wsl mount -t drvfs C:\ on /c type drvfs (rw,noatime,uid=1000,gid=1000,metadata,case=off) - laptop (no automount). Office machine is comming tomorrow.
  4. Will update this point tomorrow.

Thank you for your help.

hangxingliu commented 5 years ago

Ok, I will test Ubuntu 19.04 and putting the project into drive D later.

Btw, Is your drive D portal storage? (Eg. USB disk or portal hard disk) And it may be caused by mount info given from WSL if andy-5's wslgit works fine but this one doesn't

ScarletFlash commented 5 years ago

No, D-drive is regular HDD. C-drive is SSD. All software and OS is placed on SSD, but projects - on HDD.

ScarletFlash commented 5 years ago

So, I've updated my personal laptop - wslgit works well on it. But on my office computer problem does still exist.

Anyway, both my machines have the same configuration:

  1. Ubuntu, installed from Microsoft Store, switched to latest releases and updated to the latest one - 19.04.
  2. Unix path is /c/Projects at my laptop and /d/Projects at my office machine.
  3. PS C:\Users\admin> wsl mount -t drvfs C:\ on /c type drvfs (rw,noatime,uid=1000,gid=1000,metadata,case=off) - laptop (no automount). Office machine is comming tomorrow.
  4. Will update this point tomorrow.

Thank you for your help.

Office machine:

  1. Ubuntu, installed from Microsoft Store, switched to latest releases and updated to the latest one - 19.04.
  2. console@dsk-scarletflash:/d/Projects/
  3. C:\ on /c type drvfs (rw,noatime,uid=1000,gid=1000,metadata,case=off) D:\ on /d type drvfs (rw,noatime,uid=1000,gid=1000,metadata,case=off)
  4. Looking for git in: C:\WINDOWS\System32\git.bat Looking for git in: C:\Program Files\Git\cmd\git.exe Looking for git in: C:\Program Files (x86)\Git\cmd\git.exe Looking for git in: C:\Program Files\Git\cmd\git.exe Looking for git in: C:\Users\scarletflash\AppData\Local\Programs\Git\cmd\git.exe Git installation not found.
hangxingliu commented 5 years ago

Hello @ScarletFlash , I see there is a line in the output of VS Code:

Looking for git in: C:\WINDOWS\System32\git.bat

Have you put git.bat in this repository into C:\WINODWS\System32?

And could you print the output of the commands C:\WINODWS\System32\git.bat and C:\WINODWS\System32\git.bat --version to here? (Execute these commands in cmd or powershell)

Thanks

ScarletFlash commented 5 years ago

Hello, @hangxingliu

Have you put git.bat in this repository into C:\WINODWS\System32? Yep

And could you print the output of the commands C:\WINODWS\System32\git.bat /usr/bin/wslgit.sh: line 138: cd: C:\Windows\System32: No such file or directory fatal: can not cd to C:\Windows\System32 (C:\Windows\System32)

and C:\WINODWS\System32\git.bat --version ☝ the same. By the way

screenshot

hangxingliu commented 5 years ago

@ScarletFlash Thanks for your feedback. I probably know where is the problem located. I will test and try to fix it tonight.

ScarletFlash commented 5 years ago

@ScarletFlash Thanks for your feedback. I probably know where is the problem located. I will test and try to fix it tonight.

Thank you

hangxingliu commented 5 years ago

@ScarletFlash Did you upgrade to Ubuntu 19.04 via modifying /etc/update-manager/release-upgrades and executing do-release-upgrade? And is it convenient for me to debug your wslgit with TeamViewer or Google Remote Desktop?

ScarletFlash commented 5 years ago

Did you upgrade to Ubuntu 19.04 via modifying /etc/update-manager/release-upgrades and executing do-release-upgrade?

Yep

And is it convenient for me to debug your wslgit with TeamViewer or Google Remote Desktop?

Sorry, but it is not permitted. I can send you needed files, if you wish.

hangxingliu commented 5 years ago

@ScarletFlash No problem, I am trying to upgrade to 19.04 for reproducing it. I will tell you if I needed files.

And have you executed do-release-upgrade twice? Because the release version becomes 18.10 after I execute do-release-upgrade.

hangxingliu commented 5 years ago

Hello @ScarletFlash I simulated your system environment. but I can't reproduce bug happened on your computer.

There are some screenshots:

Screenshot from 2019-06-01 15-38-41 Screenshot from 2019-06-01 15-41-59


And I guess the reason of bug is because WSL didn't mount any drives when you execute git.bat , following the output you gave:

/usr/bin/wslgit.sh: line 138: cd: C:\Windows\System32: No such file or directory fatal: can not cd to C:\Windows\System32 (C:\Windows\System32)

So if you could try again in working days, you can download the latest version wslgit.dev.sh. and copy it into your WSL (overwrite old wslgit.sh). And it will generate some useful logs in file /tmp/wslgit.log. Then you can send the part of its content to here for diagnosing.

Thanks