Skip to content

Unable to clone into DFS file share - fatal: unable to update refs/remotes/origin/HEAD #4583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
cody-eding opened this issue Sep 1, 2023 · 2 comments
Open
1 task done

Comments

@cody-eding
Copy link

  • I was not able to find an open or closed issue matching what I'm seeing

This issue is very similar to 2753 and 1345 but not identical.

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.41.0.windows.3
cpu: x86_64
built from commit: 4a1821dfb0c2160a4fcc85d2845f095c54339578
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Windows Server 2019 Standard

Microsoft Windows [Version 10.0.17763.4737]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
> type "C:\Program Files\Git\etc\install-options.txt"

Editor Option: VIM
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Enabled
Enable Pseudo Console Support: Disabled
Enable FSMonitor: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

File shares are fronted with Windows Distributed File System, making them accessible in a single namespace.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Issue occurs when running from Git Bash, CMD and PowerShell. Issue occurs when using navigating to share via UNC path or by mapping a network drive and using drive letter.

cd \\domain.contoso.com\dfs\share
git clone https://github.com/git-for-windows/git.git git-for-windows
  • What did you expect to occur after running these commands?

I expected the clone to succeed to the DFS share.

  • What actually happened instead?
Cloning into 'git-for-windows'...
remote: Enumerating objects: 577709, done.
remote: Counting objects: 100% (3465/3465), done.
remote: Compressing objects: 100% (1590/1590), done.
remote: Total 577709 (delta 2689), reused 2087 (delta 1874), pack-reused 574244
Receiving objects: 100% (577709/577709), 279.47 MiB | 9.85 MiB/s, done.
Resolving deltas: 100% (416977/416977), done.
error: Unable to create '//domain.contoso.com/dfs/share/git-for-windows/.git/refs/remotes/origin/HEAD.lock': No such file or directory
fatal: unable to update refs/remotes/origin/HEAD
Unlink of file 'git-for-windows/.git/objects/pack/pack-1a693f65678504ad003fbef469030293ca58336e.idx' failed. Should I try again? (y/n)

Downgrading to Git for Windows 2.18.0 (per the issues I referenced at the beginning) seems to resolve the issue but is not feasible for our environment.

@dscho
Copy link
Member

dscho commented Sep 2, 2023

This ticket looks like it would benefit from #4528, i.e. upgrading to v2.42.0(2) and setting windows.appendAtomically to false.

@cody-eding
Copy link
Author

This ticket looks like it would benefit from #4528, i.e. upgrading to v2.42.0(2) and setting windows.appendAtomically to false.

Thanks for the suggestion, but no difference in behavior so far (now testing on a local Windows 10 PC):

$ git --version --build-options

git version 2.42.0.windows.2
cpu: x86_64
built from commit: 2f819d1670fff9a1818f63b6722e9959405378e3
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
cmd.exe /c ver

Microsoft Windows [Version 10.0.19045.3324]
> type "C:\Program Files\Git\etc\install-options.txt"

Editor Option: Notepad++
Custom Editor Path:
Default Branch Option: main
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Disabled
Enable FSMonitor: Disabled

Configuration has been set globally:

git config --list --show-origin
file:C:/Program Files/Git/etc/gitconfig diff.astextplain.textconv=astextplain
file:C:/Program Files/Git/etc/gitconfig filter.lfs.clean=git-lfs clean -- %f
file:C:/Program Files/Git/etc/gitconfig filter.lfs.smudge=git-lfs smudge -- %f
file:C:/Program Files/Git/etc/gitconfig filter.lfs.process=git-lfs filter-process
file:C:/Program Files/Git/etc/gitconfig filter.lfs.required=true
file:C:/Program Files/Git/etc/gitconfig http.sslbackend=openssl
file:C:/Program Files/Git/etc/gitconfig http.sslcainfo=C:/Program Files/Git/mingw64/etc/ssl/certs/ca-bundle.crt
file:C:/Program Files/Git/etc/gitconfig core.autocrlf=true
file:C:/Program Files/Git/etc/gitconfig core.fscache=true
file:C:/Program Files/Git/etc/gitconfig core.symlinks=false
file:C:/Program Files/Git/etc/gitconfig core.editor="C:\\Program Files\\Notepad++\\notepad++.exe" -multiInst -notabbar -nosession -noPlugin
file:C:/Program Files/Git/etc/gitconfig pull.rebase=false
file:C:/Program Files/Git/etc/gitconfig credential.helper=manager
file:C:/Program Files/Git/etc/gitconfig credential.https://dev.azure.com.usehttppath=true
file:C:/Program Files/Git/etc/gitconfig init.defaultbranch=main
file:C:/Program Files/Git/etc/gitconfig windows.appendatomically=false
file:C:/Users/edingco/.gitconfig        filter.lfs.clean=git-lfs clean -- %f
file:C:/Users/edingco/.gitconfig        filter.lfs.smudge=git-lfs smudge -- %f
file:C:/Users/edingco/.gitconfig        filter.lfs.process=git-lfs filter-process
file:C:/Users/edingco/.gitconfig        filter.lfs.required=true
file:C:/Users/edingco/.gitconfig        user.name=Cody Eding
file:C:/Users/edingco/.gitconfig        [email protected]
file:C:/Users/edingco/.gitconfig        difftool.sourcetree.cmd='' "$LOCAL" "$REMOTE"
file:C:/Users/edingco/.gitconfig        mergetool.sourcetree.cmd=''
file:C:/Users/edingco/.gitconfig        mergetool.sourcetree.trustexitcode=true
file:C:/Users/edingco/.gitconfig        core.editor="C:\Users\edingco\AppData\Local\Programs\Microsoft VS Code\bin\code" --wait
git clone https://github.com/edingc/munki-enroll.git appendTest
Cloning into 'appendTest'...
remote: Enumerating objects: 168, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 168 (delta 1), reused 8 (delta 1), pack-reused 160
Receiving objects: 100% (168/168), 64.29 KiB | 406.00 KiB/s, done.
Resolving deltas: 100% (66/66), done.
error: Unable to create '//fileserver.contoso.com/dfs/share/Cody/appendTest/.git/refs/remotes/origin/HEAD.lock': No such file or directory
fatal: unable to update refs/remotes/origin/HEAD
Unlink of file 'appendTest/.git/objects/pack/pack-61f8cbb5fa0cae054e6f5f725b7aea5f213ddf27.idx' failed. Should I try again? (y/n)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@dscho @cody-eding and others