[GH-ISSUE #361] Allow per-repository configuration for LFS migration and issue synchronization in mirror settings #7396

Open
opened 2026-08-21 19:52:34 -05:00 by GiteaMirror · 7 comments
Owner

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:

  • Migrate LFS files
  • Migrate issues

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.

Image

Always migrating...
Image

Migrating manually in gitea without LFS configured is successful as followed.

Image Image

In this situation, there is no way to say:

"Mirror this repository, but do not migrate its LFS files."

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:

  • Some repositories have valuable issues/discussions, but their Git/LFS data is not particularly important.
  • Some repositories have a very large number of release assets, and storing all of them locally would consume an unreasonable amount of disk space.
  • Some repositories require LFS migration, while others should explicitly skip LFS.
  • Some repositories only need source code and tags, while others need issues, releases, or LFS objects.

Proposed improvement

I suggest allowing the mirror configuration to be overridden per repository.

For example, the global mirror configuration could define defaults:

Migrate LFS files: Yes
Migrate issues:    Yes
Migrate releases:  Yes

And each repository could override these options individually:

browser-use
    Migrate LFS files: No
    Migrate issues:    Yes
    Migrate releases:  No

some-other-repository
    Migrate LFS files: Yes
    Migrate issues:    No
    Migrate releases:  Yes

Alternatively, the UI could provide these options when adding or editing an individual repository:

Repository: browser-use

[ ] Migrate LFS files
[x] Migrate issues
[ ] Migrate releases

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:

  1. Enable LFS globally and have some repositories fail permanently, or
  2. Disable LFS globally and lose LFS data from repositories where it is actually needed.

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.

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: - Migrate LFS files - Migrate issues 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. <img width="2231" height="207" alt="Image" src="https://github.com/user-attachments/assets/d4cdd5ba-2266-417d-beb9-a797567fb46f" /> Always migrating... <img width="1313" height="648" alt="Image" src="https://github.com/user-attachments/assets/7a9b53c7-1785-40c5-91c4-7eccf3b42f3d" /> Migrating manually in gitea without LFS configured is successful as followed. <img width="1398" height="1009" alt="Image" src="https://github.com/user-attachments/assets/a18dab1a-580f-491e-b396-cf136bbd0413" /> <img width="1045" height="810" alt="Image" src="https://github.com/user-attachments/assets/8e4a5658-6e4d-4984-900d-d9ad2872e3f6" /> In this situation, there is no way to say: > "Mirror this repository, but do not migrate its LFS files." 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: - Some repositories have valuable **issues/discussions**, but their Git/LFS data is not particularly important. - Some repositories have a very large number of **release assets**, and storing all of them locally would consume an unreasonable amount of disk space. - Some repositories require LFS migration, while others should explicitly skip LFS. - Some repositories only need source code and tags, while others need issues, releases, or LFS objects. ## Proposed improvement I suggest allowing the mirror configuration to be overridden **per repository**. For example, the global mirror configuration could define defaults: Migrate LFS files: Yes Migrate issues: Yes Migrate releases: Yes And each repository could override these options individually: browser-use Migrate LFS files: No Migrate issues: Yes Migrate releases: No some-other-repository Migrate LFS files: Yes Migrate issues: No Migrate releases: Yes Alternatively, the UI could provide these options when adding or editing an individual repository: Repository: browser-use [ ] Migrate LFS files [x] Migrate issues [ ] Migrate releases 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: 1. Enable LFS globally and have some repositories fail permanently, or 2. Disable LFS globally and lose LFS data from repositories where it is actually needed. 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.
Author
Owner

@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.

<!-- gh-comment-id:5346940996 --> @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.
Author
Owner

@arunavo4 commented on GitHub (Aug 19, 2026):

Yeah, you've read this right.

We pass lfs: true straight 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.

<!-- gh-comment-id:5349193649 --> @arunavo4 commented on GitHub (Aug 19, 2026): Yeah, you've read this right. We pass `lfs: true` straight 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.
Author
Owner

@arunavo4 commented on GitHub (Aug 20, 2026):

@MMMMMoris Please test out the new version and let me know

<!-- gh-comment-id:5349792936 --> @arunavo4 commented on GitHub (Aug 20, 2026): @MMMMMoris Please test out the new version and let me know
Author
Owner

@MMMMMoris commented on GitHub (Aug 20, 2026):

@MMMMMoris Please test out the new version and let me know

Great! I'll be testing it later.👍

<!-- gh-comment-id:5350117030 --> @MMMMMoris commented on GitHub (Aug 20, 2026): > @MMMMMoris Please test out the new version and let me know Great! I'll be testing it later.👍
Author
Owner

@MMMMMoris commented on GitHub (Aug 20, 2026):

@MMMMMoris Please test out the new version and let me know

It works! Marvelous! Keep testing...

<!-- gh-comment-id:5353460944 --> @MMMMMoris commented on GitHub (Aug 20, 2026): > [@MMMMMoris](https://github.com/MMMMMoris) Please test out the new version and let me know It works! Marvelous! Keep testing...
Author
Owner

@MMMMMoris commented on GitHub (Aug 20, 2026):

@MMMMMoris Please test out the new version and let me know

Seems like sync configurations are missing under mobile mode.

Screenshot_2026-08-21-01-26-26-618_com.android.chrome-edit.jpg

<!-- gh-comment-id:5359411764 --> @MMMMMoris commented on GitHub (Aug 20, 2026): > @MMMMMoris Please test out the new version and let me know Seems like sync configurations are missing under mobile mode. ![Screenshot_2026-08-21-01-26-26-618_com.android.chrome-edit.jpg](https://github.com/user-attachments/assets/2a234b1e-2fd3-406f-a629-c839d0ed6999)
Author
Owner

@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:

Mobile repository card with the new three dot menu open, showing Mirror Options Mirror options dialog on mobile

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.

<!-- gh-comment-id:5364187495 --> @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: <img src="https://gist.githubusercontent.com/arunavo4/7decfc7905cee7dba9af3df8f328ff13/raw/8c19f910fd49b4c9cc41f40cbb1087c96a19b108/shot-mobile-menu.png" width="320" alt="Mobile repository card with the new three dot menu open, showing Mirror Options" /> <img src="https://gist.githubusercontent.com/arunavo4/7decfc7905cee7dba9af3df8f328ff13/raw/8c19f910fd49b4c9cc41f40cbb1087c96a19b108/shot-mobile-dialog.png" width="320" alt="Mirror options dialog on mobile" /> 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea-mirror#7396