gh-gei
gh-gei copied to clipboard
MigrateRepositoryJob: Pushing a batch of 1 Git refs failed on attempt 4/4.
Description
Migrating the entire organization, few repositories failed the migration. When I tried to migrate those repositories one by one, I'm getting the same error in the logs:
[2024-02-01T18:40:19Z] INFO -- Git source migration started
[2024-02-01T19:05:04Z] ERROR -- MigrateRepositoryJob: Pushing a batch of 1 Git refs failed on attempt 4/4.
[2024-02-01T19:05:04Z] ERROR -- MigrateRepositoryJob: If this happens repeatedly and causes your migration to fail, it means that your repository is too large or complex for GitHub Enterprise Importer.
[2024-02-01T19:05:04Z] ERROR -- Git source migration failed. Please check the Migration Log for more details. Error message: An error occurred while pushing to the remote
[2024-02-01T19:05:04Z] INFO -- Git source migration failed
[2024-02-01T19:05:04Z] INFO -- -----------------------------
[2024-02-01T19:05:04Z] INFO -- Migration failed
[2024-02-01T19:05:04Z] INFO -- -----------------------------
When I run git-sizer on this repo, here are the results:
Processing blobs: 27512
Processing trees: 14920
Processing commits: 4704
Matching commits to trees: 4704
Processing annotated tags: 211
Processing references: 302
| Name | Value | Level of concern |
| ---------------------------- | --------- | ------------------------------ |
| Overall repository size | | |
| * Commits | | |
| * Count | 4.70 k | |
| * Total size | 1.92 MiB | |
| * Trees | | |
| * Count | 14.9 k | |
| * Total size | 51.8 MiB | |
| * Total tree entries | 1.08 M | |
| * Blobs | | |
| * Count | 27.5 k | |
| * Total size | 5.09 GiB | |
| * Annotated tags | | |
| * Count | 211 | |
| * References | | |
| * Count | 302 | |
| * Branches | 1 | |
| * Tags | 218 | |
| * Remote-tracking refs | 83 | |
| | | |
| Biggest objects | | |
| * Commits | | |
| * Maximum size [1] | 3.68 KiB | |
| * Maximum parents [2] | 2 | |
| * Trees | | |
| * Maximum entries [3] | 274 | |
| * Blobs | | |
| * Maximum size [4] | 59.3 MiB | ****** |
| | | |
| History structure | | |
| * Maximum history depth | 3.17 k | |
| * Maximum tag depth [5] | 1 | |
| | | |
| Biggest checkouts | | |
| * Number of directories [6] | 294 | |
| * Maximum path depth [7] | 8 | |
| * Maximum path length [7] | 189 B | * |
| * Number of files [8] | 4.41 k | |
| * Total size of files [8] | 677 MiB | |
| * Number of symlinks [9] | 3 | |
| * Number of submodules | 0 | |
There are no specific rulesets defined, but there are some branch protection rules which are no different than on other repositories where all went through.
Reproduction Steps
gh gei migrate-repo --github-source-org xxx --source-repo xxx --github-target-org xxx --target-repo xxx
I am having the same issue. I also tried using --skip-releases
to see if that would help, but it didn't.
After working with Github Support, there is a setting they can change in the target organization called Octoshift GitOps Feature flag
which helped us get past this issue.