1

Trying to move a repo to a new server using git clone --mirror. But when pushing it fails with remote: fatal: git cat-file: could not get object info

Here my steps:

git clone --mirror oldRepoUrl
cd old cloned repo
git remote add newRepoName newRepoUrl
git push -f --tags newRepoName refs/heads/*:refs/heads/*

The destination is a new empty repo.

Heres the error I get:

remote: System hooks checking refs/heads/master
remote: fatal: git cat-file: could not get object info
remote: fatal: git cat-file: could not get object info
remote: warn: committer emails ["email1@mail.com",...etc multiples] are not found in Github

Could this be due to the committers that are no longer part of the project? Or something else?

Thanks!

kipper3d
  • 81
  • 1
  • 1
  • 2

1 Answers1

0

Instead of using the refspec "refs/heads/*:refs/heads/*", try instead a git push --mirror, and see if the issue persists.

For testing, try and push it to a brand new empty repository.

Note: the committers are mentioned as a warning.
The fatal error comes from something else (this issue illustrated the submodule cause, but if you don't have any .gitmodules, that should not concern you)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Same error with git push newRepoName --mirror . newRepoName is a new empty repository. – kipper3d Mar 10 '20 at 13:48
  • @kipper3d I meant: `git push --mirror newRepoName` (`--mirror` before the remote). And `newRepoName` would be the name of a remote (`git remote -v`) referencing the URL of the new empty repository) – VonC Mar 10 '20 at 13:50
  • Same error... Any way to get more information out of this error because 'remote: fatal: git cat-file: could not get object info' really doesn't tell us much. It is followed by warning due to missing committers. – kipper3d Mar 10 '20 at 14:48
  • @kipper3d If you have a recent version of Git (2.22+), you can activate trace2: https://stackoverflow.com/a/56094711/6309, as documented in https://github.com/git/git/blob/master/Documentation/technical/api-trace2.txt – VonC Mar 10 '20 at 14:53