Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #7180

Closed
Open
Created Jun 23, 2014 by Administrator@rootOwner

Error 500: "empty object" "loose object" on push to gitlab

Created by: james-cook

(Background The remote m/c had 1 or 2 crashes recently so this is a possible cause).

On commit/pushing to remote with eGit or tortoise I'm suddenly getting an "empty object"/"loose object" fatal error. But the file mentioned (.git/objects/98/xxxxx) is not empty. Locally, AFAICT, everything is fine.

  • Clicking on the HEAD (hash number) in gitlab produces a 404 (git resource not found) message and
  • clicking on the Project Name itself leads to a 500 error:"we're sorry something went wrong".
  • NOTE that clicking on the previous commit hash in gitlab works fine.

For the 500 internal server error (mentioned above) in the gitlab log I'm getting ActionView:Template::Error (undefined method 'sha' for Nil:Nilclass)

I've tried a number things, but it's only making matters worse. e.g. Client> git reset --hard hash for last good commit/push e.g. XXXX - **HEAD is now at XXXX Client> git push origin :master - again getting:

  • the empty/loose object message - AFAICT the filename is the hash for the "old" failed/corrupt PUSH
  • "refs/remotes/origin/master does not Point to a valid object!"
  • "remote: warning deleting the current branch"
  • "fatal: remote end hung up unexpectedly"

Client> git push origin master - rejected with fast Forward error

My question is, in such cases, where AFAICT, the most recent PUSH on the remote side is corrupt - what's the best way to get things working again? Locally everything appears to be fine.

Assignee
Assign to
Time tracking