[GH-ISSUE #268] Imported repositories stuck at mirroring state #2509

Open
opened 2026-05-15 05:11:19 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @iqfareez on GitHub (Apr 14, 2026).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/268

Originally assigned to: @arunavo4 on GitHub.

I couldn't found existing issue that relates to my problem so I'm creating one.

While most of the imported repositories being mirrored successfully. There still a bunch left in the "Mirroring" state. I waited hours and it still in the mirroring state. I don't know what causes them to not actually mirroring to gitea. Clicking the gitea link button on the right showing Page not found.

Image

There is no job pending in Activity Logs either. What have I tried:

  • Restarted the Docker container.
  • Restarted the computer.

But neiter solves the mirroing issues. So, how do I make gitea-mirror continue to actually mirror to gitea? Thanks to all!

Originally created by @iqfareez on GitHub (Apr 14, 2026). Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/268 Originally assigned to: @arunavo4 on GitHub. I couldn't found existing issue that relates to my problem so I'm creating one. While most of the imported repositories being mirrored successfully. There still a bunch left in the "Mirroring" state. I waited hours and it still in the mirroring state. I don't know what causes them to not actually mirroring to gitea. Clicking the gitea link button on the right showing Page not found. <img width="1506" height="784" alt="Image" src="https://github.com/user-attachments/assets/803d865a-f161-469b-b3f3-978b94666a51" /> There is no job pending in Activity Logs either. What have I tried: - Restarted the Docker container. - Restarted the computer. But neiter solves the mirroing issues. So, how do I make gitea-mirror continue to actually mirror to gitea? Thanks to all!
GiteaMirror added the question label 2026-05-15 05:11:19 -05:00
Author
Owner

@arunavo4 commented on GitHub (Apr 15, 2026):

@iqfareez please drop the logs

<!-- gh-comment-id:4248485817 --> @arunavo4 commented on GitHub (Apr 15, 2026): @iqfareez please drop the logs
Author
Owner

@rijndael86 commented on GitHub (May 1, 2026):

this is also happening to me, I've been stuck with 191 mirroring repos for many days now, out of 347

<!-- gh-comment-id:4359886551 --> @rijndael86 commented on GitHub (May 1, 2026): this is also happening to me, I've been stuck with 191 mirroring repos for many days now, out of 347
Author
Owner

@arunavo4 commented on GitHub (May 2, 2026):

this is also happening to me, I've been stuck with 191 mirroring repos for many days now, out of 347

@rijndael86 please drop some logs that would help narrow the issue

<!-- gh-comment-id:4363914326 --> @arunavo4 commented on GitHub (May 2, 2026): > this is also happening to me, I've been stuck with 191 mirroring repos for many days now, out of 347 @rijndael86 please drop some logs that would help narrow the issue
Author
Owner

@elpastorios commented on GitHub (May 3, 2026):

To add to this, I "think" I am experiencing the same issue. I was on v3.15 when first installed and just updated to v3.15.6 but the issue persists. When I am stuck at the mirroring state, for some reason multiple reps are created in gitea for the same rep.

Image &

Image &

Image

gitea-mirror-logs.txt

<!-- gh-comment-id:4365997730 --> @elpastorios commented on GitHub (May 3, 2026): To add to this, I "think" I am experiencing the same issue. I was on v3.15 when first installed and just updated to v3.15.6 but the issue persists. When I am stuck at the mirroring state, for some reason multiple reps are created in gitea for the same rep. <img width="902" height="380" alt="Image" src="https://github.com/user-attachments/assets/e826a41d-ddfe-4bef-9d02-5eba49414946" /> & <img width="1634" height="196" alt="Image" src="https://github.com/user-attachments/assets/3f6f7b79-c423-4a0a-b622-2ea1a3a7f172" /> & <img width="905" height="570" alt="Image" src="https://github.com/user-attachments/assets/79dbeff5-e2f4-49bc-a545-abba8cc75847" /> [gitea-mirror-logs.txt](https://github.com/user-attachments/files/27316386/gitea-mirror-logs.txt)
Author
Owner

@arunavo4 commented on GitHub (May 4, 2026):

Released v3.15.7 with a fix. Quick heads up on what it does and doesn't cover.

The actual bug was a JS scoping issue in the catch block. When the Gitea migrate call timed out or hit any other error, the catch tried to read a variable that didn't exist in its scope, threw a ReferenceError, and never got around to updating the repo to "failed" in the database. That's why everything sat silently in "mirroring" with no entry in Activity Logs.

After upgrading:

@iqfareez and @rijndael86, your existing stuck repos will move to "failed" on the next retry attempt, or automatically once they cross the 2 hour stale window. Once they fail, the activity log will show the real underlying error (timeout, auth, rate limit, whatever it actually is). Please retry after upgrading and post the new error message here. That's the part we can't see right now and it's what we need to diagnose your specific case.

@elpastorios, the same-repo-multiple-times pattern in your screenshot is a separate issue. What's happening is that Gitea finishes the migration in the background even after our HTTP client times out, so an orphan repo gets left behind. On retry, the unique name logic finds that orphan and adds -1, -2 suffixes. To unstick: delete the orphan repos in Gitea manually, then retry. The orphan detection fix is on the follow-up list.

<!-- gh-comment-id:4367910594 --> @arunavo4 commented on GitHub (May 4, 2026): Released v3.15.7 with a fix. Quick heads up on what it does and doesn't cover. The actual bug was a JS scoping issue in the catch block. When the Gitea migrate call timed out or hit any other error, the catch tried to read a variable that didn't exist in its scope, threw a ReferenceError, and never got around to updating the repo to "failed" in the database. That's why everything sat silently in "mirroring" with no entry in Activity Logs. After upgrading: @iqfareez and @rijndael86, your existing stuck repos will move to "failed" on the next retry attempt, or automatically once they cross the 2 hour stale window. Once they fail, the activity log will show the real underlying error (timeout, auth, rate limit, whatever it actually is). Please retry after upgrading and post the new error message here. That's the part we can't see right now and it's what we need to diagnose your specific case. @elpastorios, the same-repo-multiple-times pattern in your screenshot is a separate issue. What's happening is that Gitea finishes the migration in the background even after our HTTP client times out, so an orphan repo gets left behind. On retry, the unique name logic finds that orphan and adds `-1`, `-2` suffixes. To unstick: delete the orphan repos in Gitea manually, then retry. The orphan detection fix is on the follow-up list.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea-mirror#2509