2

I get this error when trying to git pull:

remote: Counting objects: 6, done. remote: Compressing objects: 100% (6/6), done. remote: Total 6 (delta 0), reused 0 (delta 0) error: unable to create temporary sha1 filename : No space left on device

fatal: failed to write object fatal: unpack-objects failed

I checked and I use only 57% of disk space, and have plenty of free space for the pull action. Last pull was about a week ago and there was no such problem. What can be the reason?

My question is not a duplicate with this one. The problem there is the object already exists, while my problem is that I get no free space error while df -h shows only 57% percent usage.

matisa
  • 497
  • 3
  • 25
  • could you try to run `git gc` and then pull again? – Nghia Bui May 21 '19 at 09:07
  • 1
    I think its duplicate: https://stackoverflow.com/questions/685319/git-pull-error-unable-to-create-temporary-sha1-filename – Vishal May 21 '19 at 09:11
  • 3
    From experience, when a process is reporting there is `no space left on device` and you think there is still space left, in the overwhelming majority of cases you are wrong and the process is right (a little bit like when a compiler reports a syntax error you cannot directly spot with your eyes). There can be a lot of reasons (the method you used to check free space, the remaining space which is not sufficient for your operation, a COW filesystem blotted with snapshots, looking at the wrong device, ...) – Zeitounator May 21 '19 at 09:23
  • @Vishal it's not. I actually saw that one, and although the error looks similar it's not. – matisa May 21 '19 at 09:43
  • Possible duplicate of [Git pull error: unable to create temporary sha1 filename](https://stackoverflow.com/questions/685319/git-pull-error-unable-to-create-temporary-sha1-filename) – Brian Agnew May 21 '19 at 10:12

1 Answers1

7

If you have disk space, it may be inodes. Check the amount of inodes left on the disk(if you're using Linux / Mac) with the following command:

df -ih

From wikipedia:

The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block location(s) of the object's data. File-system object attributes may include metadata (times of last change, access, modification), as well as owner and permission data.

The amount of files on the disk matter, so try clearing some files on the disk (not large files, either).

steadweb
  • 15,364
  • 3
  • 33
  • 47