On 2025-06-27 at 00:14:02, Erwan Leroy wrote: > Hello. > > I'm writing to see if maybe this is a known issue, or if there is a > possible known workaround. I've not been part of this mailing list > before so I hope the format I'm using for reporting is going to be > correct/helpful (this is attempt #2, I did not set plain text the > first time). > > A bit of context: > At work, we are fully Windows-based, and mount our network drives > through DFS. We are fully cut-off from the internet so everything we > run is local to the internal network, which makes certain tests a bit > more time-consuming than they should be. > We have been working for years with Git and a self-hosted gitlab > server, and have had no issues. > Recently, some of the new hires started reporting lots of Git errors, > mostly apparent permission denied errors. > > One of the errors: > PS Y:\Users\xx\Public\dev\test_for_it> git remote add origin > git@xxxxxxxxx.local:xx/test.git > Rename from '//atl-xx/Basecamp_Atl/Users/xx/Public/dev/test_for_it/.git/config.lock' > to '//atl-xx/Basecamp_Atl/Users/xx/Public/dev/test_for_it/.git/config' > failed. Should I try again? (y/n) n > error: could not write config file .git/config: Permission denied > fatal: could not set 'remote.origin.url' to 'git@xxxxxxxxx.local:xx/test.git' > > > What we found out: > - The first thing we found out was that only network drives were affected. > - The second thing we noticed was that not only new employees after a > certain date were getting issues, but also longer employees getting > new workstations. This started to make an actual permission issue less > likely, as there was no change to their user permissions. > - Then we noticed that the delimiting factor was the Git version: > Users on Git 2.21 and older had no problems. Users on Git 2.36 and > newer (we also had some users on 2.47, and today downloaded and tested > the latest 2.50). I would have tested every version in the range 2.21 > to 2.36 to help narrow exactly where it breaks, but I can't find > pre-compiled versions for old versions and I'm not currently set up > for compiling from source. > - We also recently found out it only breaks when accessing through > DFS, if we directly access the corresponding UNC path (what DFS > resolves to), we do not get the same error. I would suggest looking at the Git for Windows issue tracker. There are a couple of DFS-related issues, including https://github.com/git-for-windows/git/issues/3825, which seems potentially relevant. Unfortunately, I don't use Windows, so I'm afraid I can't be of more help, but this definitely seems like a Windows-specific issue, so the Git for Windows issue tracker would be the best place to discuss it. Dscho, the maintainer, is very capable and will likely know how to handle this problem. If you need a workaround and the one in that issue doesn't work, you may wish to try using the Windows Subsystem for Linux for accessing the repository after configuring it for Unix metadata support as outlined in [0]. In that case, it will be Windows itself that will be doing the conversion to POSIX-style path handling and it's likely that it will be perhaps a little less brittle than MSYS2 in handling some of the more esoteric Windows file system features (such as DFS). Best of luck in getting this to work. [0] https://stackoverflow.com/questions/78997348/git-shows-all-files-changed-when-git-init-was-used-in-wsl-and-git-diff-in-wi -- brian m. carlson (they/them) Toronto, Ontario, CA
Attachment:
signature.asc
Description: PGP signature