mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-11-16 14:45:02 -06:00
[GH-ISSUE #361] Allow per-repository configuration for LFS migration and issue synchronization in mirror settings #8430
Reference in New Issue
Block a user
Originally created by @MMMMMoris on GitHub (Aug 19, 2026).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/361
Originally assigned to: @arunavo4 on GitHub.
First of all
Thank you for all your work! They are wonderful. 🚀
Secondly
Allow per-repository configuration for LFS migration and issue synchronization in mirror settings
I would like to request a more flexible configuration model for repository mirroring.
Currently, the mirror configuration appears to apply the same settings to all repositories, including options such as:
This becomes problematic when mirroring a large number of repositories because different repositories often have very different requirements.
For example, some repositories such as browser-use consistently fail to mirror when "Migrate LFS files" is enabled. The migration reaches the LFS synchronization stage and fails, which causes the entire mirror operation to fail.
Always migrating...

Migrating manually in gitea without LFS configured is successful as followed.
In this situation, there is no way to say:
Because the LFS option is configured globally for the mirror task, repositories that cannot be migrated with LFS enabled will repeatedly fail.
There are also other practical cases:
Proposed improvement
I suggest allowing the mirror configuration to be overridden per repository.
For example, the global mirror configuration could define defaults:
And each repository could override these options individually:
Alternatively, the UI could provide these options when adding or editing an individual repository:
The global mirror configuration could still remain as the default, while allowing individual repositories to override it.
Why this would be useful
A single global configuration is difficult to use when mirroring repositories with significantly different characteristics.
More importantly, a single repository that cannot be migrated with LFS enabled can currently prevent that repository from being mirrored successfully at all.
Per-repository settings would allow users to choose the appropriate level of synchronization for each repository instead of having to choose between:
The same applies to issues and release assets. Different repositories have different priorities and storage requirements.
I believe making the mirror options configurable per repository would make the mirroring system considerably more flexible and practical for large-scale GitHub/Gitea mirroring.
Feature request: Please consider adding per-repository overrides for LFS migration, issue synchronization, and ideally other resource types such as releases/assets as well.
@MMMMMoris commented on GitHub (Aug 19, 2026):
Not just LFS migration and issue synchronization, any other configurations can be included while preparing to migrate should be able to be customized.
@arunavo4 commented on GitHub (Aug 19, 2026):
Yeah, you've read this right.
We pass
lfs: truestraight through to Gitea's/repos/migrate, so the LFS pull happens inside Gitea's migration, not in our code. When it fails, Gitea throws out the whole migration and there's nothing left on our side to salvage. That's why it worked when you did it by hand with LFS off.So we can't just catch it and carry on. Turning LFS off per repo is the only real fix here. Agreed it should be there.
Same story for the rest of your list. Issues, PRs, releases and wiki are all global right now. Repos already have a per-repo destination override, so there's a pattern to copy for this.
Couple of things before I start:
Do you want this at the org level too, so it goes global -> org -> repo? Orgs already have their own destination override, so it's cheap to add now and annoying to bolt on later. If you're mirroring a lot of repos, "everything under this org skips LFS" probably beats ticking boxes one at a time.
And which of these do you actually need? I'm planning LFS, issues, PRs, releases and wiki. If there's something else you'd want to set per repo, mention it now and I'll fold it in.
@arunavo4 commented on GitHub (Aug 20, 2026):
@MMMMMoris Please test out the new version and let me know
@MMMMMoris commented on GitHub (Aug 20, 2026):
Great! I'll be testing it later.👍
@MMMMMoris commented on GitHub (Aug 20, 2026):
It works! Marvelous! Keep testing...
@MMMMMoris commented on GitHub (Aug 20, 2026):
Seems like sync configurations are missing under mobile mode.
@arunavo4 commented on GitHub (Aug 21, 2026):
@MMMMMoris Fixed in v3.27.1. The mobile cards had no menu at all, the options were only wired into the desktop table. Each card now has the same three dot menu:
The Organizations page had the same gap in reverse, the desktop menu was missing the entry while mobile had it. Both are in v3.27.1, image is on ghcr now. Thanks for catching it so quickly.
@MMMMMoris commented on GitHub (Aug 22, 2026):
Yeah, it works on mobile now.
I have some questions and suggestions regarding the current repository mirroring behavior and UI.
1. Releases and Tags Synchronization
I have a question about how Releases and Tags are handled during mirroring.
As far as I understand, a GitHub Release is associated with a Git tag. If the mirror option includes Releases, does that mean the corresponding tags must also be synchronized?
More specifically:
For example, some repositories have a very large number of historical releases and tags, while I may only be interested in the latest few releases.
I am not very familiar with the internal synchronization mechanism between Releases and Tags, so I would also appreciate some clarification on how this currently works.
If possible, it would be useful to have per-repository options such as:
This could help significantly reduce unnecessary storage usage when mirroring repositories with a large amount of historical release data.
2. Repository Description Is Not Synchronized
Another issue I noticed is that the repository description does not seem to be synchronized when creating a mirror through
gitea-mirror.For comparison, Gitea's built-in repository mirroring functionality is able to synchronize the repository description.
However, when I create the same repository using
gitea-mirror, the mirror repository does not appear to inherit the original repository description.Would it be possible to synchronize the repository description as part of the mirror process?
3. Mobile Repository Card UI Improvements
I also have some UI suggestions for the repository cards on mobile devices.
Currently, most of the information in the repository card is concentrated on the left side, while there is a relatively large amount of unused space on the right side.
I think the layout could make better use of the available horizontal space.
Current Layout
The
Customtag takes up space around the repository information, while the synchronization status and other metadata are also mostly positioned on the left.The result is roughly:
Suggested Layout
I would suggest moving the
Customtag to the same row as the repository name, preferably near the top-right area.Similarly, synchronization status tags such as:
SyncedSyncingFailedcould be moved toward the right side of the card.
Also looks good like this:
This would make the card more balanced and use the available horizontal space more effectively.
I also noticed that the repository name row does not always appear to be perfectly horizontally aligned. It may be related to reserving space for the
Customtag.If possible, the repository name and related elements could be aligned consistently regardless of whether the
Customtag is present.Thanks for the great work on
gitea-mirror!@arunavo4 commented on GitHub (Aug 22, 2026):
@MMMMMoris Thanks for all the suggestions I will work on it next week
@arunavo4 commented on GitHub (Aug 24, 2026):
@MMMMMoris All three are in #370, merged to main and part of the next release.
Releases and tags. Tags are not something gitea-mirror syncs itself. Gitea's own git mirror pulls every ref, tags included, so they arrive with the code and cost nothing beyond the commits already in the clone. There is nothing to limit there. Releases are created through the Gitea API on top of those tags, and their assets are the real disk cost. The global "latest N releases" setting already existed (default 10, older ones get pruned from Gitea). It can now be overridden per repository and per organization: Mirror Options has a new "Release limit" field under Releases, empty means inherit.
Description. It was only sent when the mirror was first created, and only from our local copy, so repos imported before that landed, or whose GitHub description changed later, never got one. Description and topics are now reconciled with GitHub on every sync. Existing mirrors pick it up on their next sync, no re-mirror needed.
Mobile cards. Name, Custom badge and menu share one centred row, the other badges sit under the name, and status and last sync are on the right. The misaligned name row is gone.
Thanks for the detailed writeup.
@MMMMMoris commented on GitHub (Aug 24, 2026):
What an efficient and quick fix! You have all my thanks. I love
gitea-mirror!I made a small donation to support the project. Thanks for your work!
@arunavo4 commented on GitHub (Aug 24, 2026):
@MMMMMoris Thanks for your support appreciate your kind gesture