24

I'm encountering this Git error while trying to push a local branch. I tried possible ways and followed a few SO posts, but they didn't help.

remote: error: file write error (No space left on device) remote: fatal: unable to write sha1 file error: unpack failed: unpack-objects abnormal exit

halfer
  • 19,824
  • 17
  • 99
  • 186
Manoj
  • 953
  • 2
  • 8
  • 24
  • Isn't this self-explanatory? The remote end is out of disk-space... – kusma Nov 28 '13 at 16:55
  • 1
    @kusma This does not help! I need a solution. – Manoj Nov 28 '13 at 16:57
  • 2
    why there is a downvote ? – Manoj Nov 29 '13 at 05:36
  • Do you really need the obvious spelled out? If the remote end is out of disk-space, disk space must either be free'd up, or a bigger hard drive must be installed in the remote end. – kusma Nov 29 '13 at 10:04
  • 2
    @kusma Before posting it in SO, I obviously knew (from the error log) there is out of disk-space in remote end, and what I was expecting the steps to free up from remote disk space. Can anyone free up some space if he/she is not in group admin? I hope this makes more sense now. – Manoj Nov 29 '13 at 10:18
  • An administrator on the remote end needs to free up space. – kusma Nov 29 '13 at 14:22
  • could this happen if the local machine runs out of memory? I get this error when doing a `git commit blah blah blah` . – kRazzy R Nov 15 '17 at 06:16

5 Answers5

7

TLDR: run the command:

git gc

That worked for me despite the error seeming like it resides on the server.

Pete B.
  • 3,188
  • 6
  • 25
  • 38
  • 1
    I am not sure why the down vote, but this command worked for me. I was not out of disk space but was still getting the error. Running this command solved my issue. – Pete B. Jul 24 '19 at 19:37
  • 4
    Ironically, I'm getting this error while running git gc! – Andrew Grimm Nov 17 '20 at 05:29
  • This command fixed my problem as well. `git gc` simply clean up unnecessary files and optimize the local repository. – Brzozova Sep 13 '21 at 09:14
6

I think there is no space left in your remote, check this other post:

Hudson: returned status code 141: fatal: write error: No space left on device

Community
  • 1
  • 1
Josué
  • 120
  • 4
4

You're out of drive space. Delete some unused files from anywhere on your machine.

Adrian
  • 197
  • 1
  • 8
2

I got the error having enough space left on device when I tried to git add large files (>1GB). Adding these files to .gitignore solved it. See also this post:

Max file size and max repository size in Git?

fgwe84
  • 168
  • 7
1

If you are on a remote server, try deleting the files inside /tmp.

cd /tmp
rm -rf *