Search code examples
githubgit-lfs

How to get large files from git-lfs when error even though you have credits


I've tried adding 100 GB of LFS credits to my github account but still get:

"This repository is over its data quota. Purchase more data packs to restore access."

For this repo:

https://github.com/aarch64-laptops/prebuilt

And I've tried forking the repo to a new repo under my account but same issue. Any other way to get these large files?


Solution

  • Forking wouldn't solve the problem, as stated in nabla-c0d3/nassl issue 17

    To be honest, I'm very disappointed with how GitHub supports git-lfs for public projects. Charging for storage and bandwidth makes no sense, especially since switching to git-lfs reduces bandwidth usage / cost for GitHub, compared to just storing big files in git. The fact the quotas are for every fork, which I did not know, is even crazier.

    I agree with you that git-lfs leaves a lot to be desired, and I think you raise an excellent point about charging us for something that saves them money.

    If you don't care about the history of those large file, you could, in the context of your additional credit:

    • create a new local repository
    • add one of those large files in it
    • add, commit, and push
    • repeat for each other large file (see if the process blocks at any point)

    But: if you don't have already a local copy of those large files, only a git lfs clone + git lfs fetch would be able to get them back.

    And... if the bandwidth limit is already reached, that won't help.
    You need to get those files from a third-party source, or plead your case to GitHub support.


    Douglas Gaskell asks in the comments:

    [Does that mean] large files in LFS in a repo that the owner is inactive are effectively lost unless you can get GitHub support to give them to you? Since forking doesn't appear to let us download them with our own LFS limits.

    Probably, yes: If the owner of a repository is inactive and the bandwidth or storage limit for the repository has been reached, you may not be able to retrieve large files stored in Git Large File Storage (Git LFS) without assistance from GitHub support.

    When you fork a repository, the LFS files are not duplicated; instead, the fork points to the same LFS objects as the original repository. Therefore, the forked repository shares the bandwidth and storage limits with the original repository.

    So, if the quota is already exhausted for the repository, you would not be able to download the LFS files even with your own quota. In such a situation, you would indeed need to contact GitHub support or find a third-party source for those files.