本文介绍了如何获得直接链接到github LFS(大文件存储)中的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Git LFS(大文件存储)将一个大文件上传到gitub.

I uploaded a large file to gitub using Git LFS (Large file storage).

起初,我可以从直接链接下载文件.

At first I could download the file from a direct link.

raw.githubusercontent.com/userName/reposiotry/master/file.mp4

但是第二天文件开始包含文本值

But on the next day the file began to contain a text value

oid sha256:59f24bc922e1a48bb3feeba18b23f0e9622a7ee07166d925650d7a933283f8b1
size 123882252

如何下​​载此文件?如何直接链接到它?

How do I download this file ? How to get a direct link to it ?

推荐答案

文章

如果在不购买数据包的情况下使用了超过1 GB的存储,您仍然可以克隆具有大量资产的存储库,但是您将仅检索指针文件,并且将无法将新文件备份. /p>

If you use more than 1 GB of storage without purchasing a data pack, you can still clone repositories with large assets, but you will only retrieve the pointer files, and you will not be able to push new files back up.

我假设您尚未在GitHub上为git lfs购买任何其他存储.如您所说,最初您可以通过以下链接访问它:http://raw.githubusercontent.com/userName/reposiotry/master/file.mp4

I am assuming you have not purchased any additional storage for git lfs on GitHub. As you said that initially you were able to access it via this link : http://raw.githubusercontent.com/userName/reposiotry/master/file.mp4

我猜测您上传了更多此类文件,从而导致您超出了存储配额(即1 GB).如上一篇文章所述,一旦超出配额,您将仅检索指针文件.

I am guessing that you uploaded more such files which caused you to exceed your storage quota i.e 1 GB. As pointed by the article above, you will only retrieve the pointer files once you exceed the quota.

您可以在此处检查是否已超出存储配额的限制, https://github.com/设置/计费

You can check if you have exceeded the limit of your storage quota here, https://github.com/settings/billing

但是,如果我的假设是错误的,那么您可以尝试使用此链接获取文件

However, if my assumptions are wrong, then you could try to get the file using this link

https://media.githubusercontent.com/media/user_name/repository_name/branch_name/file_name

这篇关于如何获得直接链接到github LFS(大文件存储)中的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-18 23:44