wslgit icon indicating copy to clipboard operation
wslgit copied to clipboard

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

Open ScarletFlash opened this issue 5 years ago • 16 comments

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.

ScarletFlash avatar May 23 '19 14:05 ScarletFlash

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

hangxingliu avatar May 24 '19 01:05 hangxingliu

Yes, I have updated

ScarletFlash avatar May 24 '19 04:05 ScarletFlash

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

hangxingliu avatar May 24 '19 06:05 hangxingliu

@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

hangxingliu avatar May 25 '19 13:05 hangxingliu

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.

ScarletFlash avatar May 26 '19 14:05 ScarletFlash

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

hangxingliu avatar May 26 '19 14:05 hangxingliu

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

ScarletFlash avatar May 26 '19 14:05 ScarletFlash

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.

ScarletFlash avatar May 31 '19 08:05 ScarletFlash

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

hangxingliu avatar May 31 '19 09:05 hangxingliu

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

ScarletFlash avatar May 31 '19 09:05 ScarletFlash

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

hangxingliu avatar May 31 '19 09:05 hangxingliu

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

Thank you

ScarletFlash avatar May 31 '19 10:05 ScarletFlash

@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?

hangxingliu avatar May 31 '19 10:05 hangxingliu

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.

ScarletFlash avatar May 31 '19 10:05 ScarletFlash

@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 avatar Jun 01 '19 05:06 hangxingliu

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

hangxingliu avatar Jun 01 '19 07:06 hangxingliu