Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIT pull error - remote object is corrupted

$ git pull  remote: fatal: object 21f3981dd35fccd28febabd96f27241eea856c50 is corrupted error: git upload-pack: git-pack-objects died with error. fatal: git upload-pack: aborting due to possible repository corruption on the remote side. remote: aborting due to possible repository corruption on the remote side. fatal: protocol error: bad pack header 

Any ideas why this is failing?
When I run git --bare fsck-objects --full I just see dangling links but no broken links. Also git gc didn't help in any way. When I reclone or do pull from another clone, I don't see this error.

like image 809
Senthil A Kumar Avatar asked Nov 13 '10 00:11

Senthil A Kumar


People also ask

Does git pull connect to remote?

The git pull command automatically fetches and then merges the remote data into your current branch. Pulling is an easier and comfortable workflow than fetching. Because the git clone command sets up your local master branch to track the remote master branch on the server you cloned.

What is git remote URL?

Git remote is a pointer that refers to another copy of the repository that is usually hosted on a remote server. In some situations, like when the remote repository is migrated to another host, you need to change the remote's URL. This guide explains how to change the URL of a Git remote.


1 Answers

As Julian said see https://confluence.atlassian.com/display/FISHKB/Git+indexing+fails+due+to+bad+pack+header

It really can be a memory issue, and to make sure we don't lose the solution here it is:

git config --global pack.windowMemory "100m" git config --global pack.SizeLimit "100m"  git config --global pack.threads "1" 
like image 152
cazcade_neil Avatar answered Sep 17 '22 13:09

cazcade_neil