You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
git-for-windows 2.25 stopped working with mapped network drives that require authentication ("fatal: Unable to read current working directory: No such file or directory") #2480
I was not able to find an open or closed issue matching what I'm seeing
After updating to git for Windows 2.25.0 (64 bit), I am not able to work with mapped network drives that require authentication (see error message below). The network location I'm connecting to is a samba share that uses Active Directory for authentication. Note that network locations (on the same server) that don't use authentication still work fine. This worked fine with 2.24.1.2 and all previous versions that I tried (and it works again after downgrading to 2.24.1.2).
Setup
Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options
git version 2.25.0.windows.1
cpu: x86_64
built from commit: 7c71c859c97853ed057da5cbab12f3c13b5554df
sizeof-long: 4
sizeof-size_t: 8
Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver
Microsoft Windows [Version 10.0.18363.592]
What options did you set as part of the installation? Or did you choose the
defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt
Editor Option: VIM
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled
Any other interesting things about your environment that might be related
to the issue you're seeing?
Not that I know of.
Details
Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
Tested with all of the above (with identical result)
I noticed the same problem when executing git clone on a ramdisk (imdisk) with a slightly different error message: fatal: unable to get current working directory: No such file or directory. After reverting to 2.24.1 it works again.
I noticed the same problem when executing git clone on a ramdisk (imdisk) with a slightly different error message: fatal: unable to get current working directory: No such file or directory. After reverting to 2.24.1 it works again.
Double-checked on my side. In my case, it's really fatal: Unable to **read** current working directory: No such file or directory
What is going on here? This has been committed over 1K times, but isn't in the release? I'm running 2.33.0.windows.2 and still have this issue :(
Edit: My issue is possibly unrelated. Using version 2.25.0.windows.1.9.g387e7103e8 (Snapshot from Jan 22, 2020, likely the snapshot bold-gman tested with) I still have this issue.
Edit 2: My issue was due to git searching parent directories, I think. I have access to X:\, X:\Parent\, and X:\Parent\Bad\Good\ but I'm not allowed to view X:\Parent\Bad\*
This makes little sense to me, but I didn't set up my access of course. I was able to get around the issue by mapping another drive (Z:) to X:\Parent\Bad\Good\ Now the current version runs fine
Activity
bold-gman commentedon Jan 16, 2020
I have the same issue on my machine with the current version 2.25. I want to add, that it also happens with shares on a Windows Server 2016.
esocode commentedon Jan 19, 2020
I noticed the same problem when executing
git cloneon a ramdisk (imdisk) with a slightly different error message: fatal: unable to get current working directory: No such file or directory. After reverting to 2.24.1 it works again.bmueller84 commentedon Jan 20, 2020
dscho commentedon Jan 20, 2020
Hmm. This might be caused by 1e64d18, i.e. by
GetFinalPathNameByHandleW()not handling the paths in this case.If you get a chance to compile Git for Windows from source, you could revert 1e64d18 and see whether that "fixes" the issue.
And if that "fixes" the issue, I would like you to test this patch instead of the revert:
bmueller84 commentedon Jan 21, 2020
Looks like you're on the right track. Both fixes seem to work for me :)
dscho commentedon Jan 21, 2020
@bmueller84 could you prepare a PR for this?
dscho commentedon Jan 22, 2020
Thank you, @bmueller84!
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
290 remaining items
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
mingw: fix fatal error working on mapped network drives on Windows
seadoggie01 commentedon Sep 8, 2021
What is going on here? This has been committed over 1K times, but isn't in the release? I'm running 2.33.0.windows.2 and still have this issue :(
Edit: My issue is possibly unrelated. Using version 2.25.0.windows.1.9.g387e7103e8 (Snapshot from Jan 22, 2020, likely the snapshot bold-gman tested with) I still have this issue.
Edit 2: My issue was due to git searching parent directories, I think. I have access to X:\, X:\Parent\, and X:\Parent\Bad\Good\ but I'm not allowed to view X:\Parent\Bad\*
This makes little sense to me, but I didn't set up my access of course. I was able to get around the issue by mapping another drive (Z:) to X:\Parent\Bad\Good\ Now the current version runs fine