1

For a java app I'm working we store some Ubuntu fonts in our git repository. Keep in mind, this all works as expected for other devs on other machines with a similar setup.

This issue occurs only using WSL Git and not Git for Windows/Git Bash (gitforwindows.org).

Windows (specifically System32/fontview.exe), and our application for that matter, cannot open/load these font files when they're in a git repo.

The requested file ... is not a valid font file.

mving that same file to any location outside of a Git repository, Windows is able to open the file. The file is the same (checked using sha1sum < fontfile.ttf).

The same error is also thrown when copying that file into a newly initialized Git repository.

This is true for all ttf files, even if they're newly downloaded from the web.

Even after rm -rf .git the files still cannot be opened/loaded. That specific directory name somehow becomes permanently affected.

The problem persists after a reboot.

1 Answers1

0

We are told that although accessing Windows files from WSL is OK (via /mnt/c , /mnt/d etc ), doing it the other way round, is not supported, due to the way the Linux filesystem is emulated (?) in Windows.

Hence you should copy your files to a location back in the Windows environment proper (eg. /mnt/c/Users/joebloggs/workspace ....), before trying to access them with Windows-based tools.

However, things might change, this new functionality will allow you to access the Linux filesystem like a network drive:

https://betanews.com/2019/02/16/access-linux-files-from-windows/

If you just want to run git in Windows, use "Git for Windows" without WSL ! eg https://git-scm.com/download/win

MikeW
  • 148