Reputation: 358
I have git for windows installed properly. Calling
git lfs checkout
using bash.exe on a path that contains special characters (C:\Users\myUser\öäü) fails with an error:
Error: CreateFile C:\Users\myUser\���: The system cannot find the file specified.
I've tried checking out LFS files with GitKraken to the very same directory and it fails with the same error (I see that GitKraken invokes bash.exe as well). When using git-bash.exe I cannot reproduce the error. Both terminals are MINGW64, the locale of the bash.exe prints
$ locale
LANG=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_ALL=
whereas git-bash.exe prints en_GB.UTF-8 instead. I've also tried so set
MSYSTEM=MINGW64
but that didn't help at all, unfortunately. Using /usr/bin/mintty in Mingw-w64 mode fires up a functioning bash where I cannot reproduce the issue either. Hence I am wondering how I can configure bash.exe to function correctly, I feel that there must be some way to achieve that.
Edit: git lfs version prints
git-lfs/2.12.0 (GitHub; windows amd64; go 1.15.1)
Calling git lfs checkout with GIT_TRACE=1 prints:
$ GIT_TRACE=1 git lfs checkout
14:12:20.043934 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
14:12:20.059555 git.c:704 trace: exec: git-lfs checkout
14:12:20.059555 run-command.c:663 trace: run_command: git-lfs checkout
14:12:20.079718 trace git-lfs: exec: git 'version'
14:12:20.109504 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' '--git-dir' '--show-toplevel'
14:12:20.132914 trace git-lfs: exec: uname
14:12:20.189343 trace git-lfs: exec: cygpath '-w' '.git'
14:12:20.208415 trace git-lfs: exec: cygpath '-w' 'C:/Users/myUser/äöü'
14:12:20.243879 trace git-lfs: Error running 'git rev-parse': CreateFile C:\Users\myUser\���: The system cannot find the file specified.
Error: CreateFile C:\Users\myUser\���: The system cannot find the file specified.
...
Upvotes: 1
Views: 732
Reputation: 358
@bk2204 was able to fix it in git-lfs core, see: https://github.com/git-lfs/git-lfs/issues/4227
As a workaround setting
LC_ALL=C.UTF-8
fixes the issue for me.
Upvotes: 1