0

In our company we're using our own installation of GitLab 7.13.4. Access is configured to allow both https and ssh authentication. When using a git client of version 1.7, 1.9 or 2 cloning an existing project works with both authentication methods. However, with an older (SLES 11) server that uses git version 1.6.0.2 the https-method yields the following error:

> git clone https://myuser@my.host/myrepo/myproject
Initialized empty Git repository in /users/myrepo/myuser/myproject/.git/
error: File 0000000000000000000000000000000000000000 (https://myuser@my.host/myrepo/myproject/objects/00/00000000000000000000000000000000000000) corrupt
Getting pack list for https://myuser@my.host/myrepo/myproject
Getting alternates list for https://myuser@my.host/myrepo/myproject
Also look at https://myuser@my.host//<!
Also look at window.gon={};gon.default_issues_tracker="gitlab";gon.api_version="v3";gon.relative_url_root="";gon.default_avatar_url="https://my.host/assets/no_avatar-0b64d25ac5f63e6f0caee99e819105ba.png";gon.max_file_s
Segmentation fault

The ssh-method works just fine though. The problem is that we would like to prevent having to copy private key files onto the server and also updating the git client installation. Do you have any suggestions of how to resolve this error or will a client update be necessary?

Michael Lang
  • 3,902
  • 1
  • 23
  • 37

1 Answers1

0

First, take a backup of all you important data on the server if you haven't already.

Is 0000... the actual filename or a placeholder?

If it actually is 0000... something really strange has been pushed to the git repo (a commit that has a tree with an invalid file; but the tree isn't actually corrupt because the sha1 sum matches?! I'm not sure how that happened but you would have to isolate the faulty commit and figure out how to fix it.

If it's not 0000... but some valid SHA1 sum, try finding the file in another checkout (from <repo-root>/.git/objects/xx/xxxxxxx) and copying it manually to the server. If the object is in a pack you can try unpacking it

Community
  • 1
  • 1
nishantjr
  • 1,788
  • 1
  • 15
  • 39
  • `0000...` is the actual file name in the error message. However, I can't find this object in any other successfully checked out version of my repository. And it's definitely not a name of any pushed file either. However, I have just noticed that the same error message occurs when I try to clone a non-existent repository. – Michael Lang Oct 12 '15 at 12:53
  • Hmmm. Have a look at [this](https://stackoverflow.com/questions/223678/which-commit-has-this-blob) to find which commit contains that blob. If none do, just delete the file – nishantjr Oct 13 '15 at 02:50