Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Git Interrupted System Call error

📅 2020-Aug-26 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cifs, git ⬩ 📚 Archive


I tried to clone a Git repository to a directory on a CIFS share and got this Interrupted system call error:

$ git clone ssh://
Cloning into 'foobar'...
remote: Enumerating objects: 5191, done.
remote: Counting objects: 100% (5191/5191), done.
remote: Compressing objects: 100% (638/638), done.
remote: Total 53445 (delta 5032), reused 4549 (delta 4549), pack-reused 48254
Receiving objects: 100% (53445/53445), 38.63 MiB | 32.13 MiB/s, done.
Resolving deltas: 100% (34833/34833), done.
fatal: cannot create directory at 'src/models/': Interrupted system call
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

Git indicated that the cloning succeeded, but when checking out a copy of the files to the filesytem the checkout failed. You can see that it recommends I do an explicit checkout, but that command too fails with the same error.


Diagnosing the problem, I observed that the same clone command works fine on a local filesystem, so CIFS played a role in the error. Also, the failing directory had a large binary file that was checked in using LFS.

Googling I found that the case sensitivity of the CIFS share might have played a role in the error. Older Windows filesystems were case-insensitive, so I checked whether Git was automatically switching to ignore case for the clone:

$ git config --get core.ignorecase

I decided to flip this config:

$ git config core.ignorecase false

I was comfortable doing this because I knew that my repository did not have directories or files at the same level which only differed in case.

After doing the flip, I was able to successfully do the explicit checkout:

$ git checkout -f HEAD

Tried with: Ubuntu 18.04

© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email