3

I tried to do an initial push from a local repository to a Gitlab one. The local repository was cloned from an OpenShift one and all the changes are committed and pushed. The Gitlab repository is a fresh one.

git remote add gitlab [email protected]:myorg/myproject.git git push -u gitlab master 

I get this error

error: object file .git/objects/77/236a32f242ea4e72d54540ac414c798d636d00 is empty fatal: loose object 77236a32f242ea4e72d54540ac414c798d636d00 (stored in .git/objects/77/236a32f242ea4e72d54540ac414c798d636d00) is corrupt remote: fatal: early EOF error: failed to push some refs to '[email protected]:myorg/myproject.git' 

Any idea how can I fix this?

4
  • 1
    how did you initialize your local git repo? you seem to have an issue with it Commented Mar 20, 2015 at 15:12
  • The local git repo is fetched from another remote. Pushing/pulling to the other remote works perfectly. Commented Mar 23, 2015 at 18:29
  • try to delete the broken file .git/objects/77/236a32f242ea4e72d54540ac414c798d636d00, backup it just in case Commented Mar 24, 2015 at 9:56
  • I did, I get an error for broken link from another file. Commented Mar 24, 2015 at 11:10

1 Answer 1

2

In the end, I cloned again the original repository (not the gitlab one).

Then running

git remote add gitlab [email protected]:myorg/myproject.git git push gitlab master 

worked.

I dropped the corrupted local repo, as all the changes were committed already.

Sign up to request clarification or add additional context in comments.

1 Comment

It's the name of the remote

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.