gitea: Repo mirroring doesn't mirror LFS data.

  • Gitea version (or commit ref): 1.0.0+220-g027591a3
  • Git version: 2.11.0
  • Operating system: Ubuntu 16.04 (Docker)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Bountysource

Description

In a clean install of Gitea I have attempted to mirror a Bitbucket server repository that I know has LFS enabled and stores LFS data. The LFS data appears to not being mirrored in Gitea. (The configured LFS data directory remains empty, even though the repository mirroring appears to be successful).

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 16 (10 by maintainers)

Most upvoted comments

I added to this bounty. Bountysource

Feel free to add the following code to the Issue:

[![Bountysource](https://api.bountysource.com/badge/issue?issue_id=41700547)](https://www.bountysource.com/issues/41700547-repo-mirroring-doesn-t-mirror-lfs-data)

What is steps for mirroring LFS now? Is there some hook to make LFS pull with cmd ? Or may be I need to setup some cron task ?

@GlassedSilver thanks for your support 😃 I’ve just applied the bounty label to make this easier to find.

I’d suggest to tag this as a feature request. Current behaviour is basically expected imho and supporting LFS mirrors will be challenging in some regards:

  • Need LFS client implementation
    • CLI client not developed for interactive use
    • Reusing source would require rewriting to some extent
  • Using CLI client
    • Would use at least double the disk space for the LFS objects during mirror
    • Continuous mirror pulling would likely need double the disk space all the time
  • The operation will need to scan all files in every commit for LFS meta files, potentially taking very long for large repositories

Just out of interest, does somebody know whether GitHub support automated LFS object mirroring?

For future reference: GitLab issue, git-lfs issue

No one is working on this. A bounty on bountysource might spur someone to look at it.

From a quick glance we would need to implement an LFS client - possibly through vendoring git-lfs/git-lfs. There would need to be significant changes to the mirroring UI too.

I’ll look into adding a note to the UI when LFS support is enabled.