git - 获取 git LFS 文件时出错 : Object does not exist on the server: [404] Object does not exist on the server

标签 git github git-lfs

我下载并安装了 Git 大文件存储。现在我正在尝试从 github 中的现有存储库(不是我的)获取 lfs 文件。
我试过:git lfs clone https://github.com/xxx/xxx然后在我本地刚刚克隆的仓库中:git lfs fetch --allgit lfs pull我也尝试过相同的方法,但没有“lfs”。
存储库已克隆,但对于所有 lfs 文件,始终显示此错误:

[301582dabd8c6ac7bdf626c7e4a1d64c8f9665b65b6334b44642bdfb78054575] Object does not exist on the server: [404] Object does not exist on the server
进而:
error: failed to fetch some objects from 'https://github.com/xxx/xxx.git/info/lfs'
结果,克隆了它们在 GitHub 本身中可以看到的小指针,而不是真正的大文件。
同时这个命令:git log --all -p -S 301582dabd8c6ac7bdf626c7e4a1d64c8f9665b65b6334b44642bdfb78054575给出以下结果:
commit 36c7dba69de90d99f0c305fce13a598b8f06b443
Author: xxx
Date:   Wed Sep 11 18:01:25 2019 +0200 
Add embeddings 
diff --git a/embeddings/wikipedia/0.pkl b/embeddings/wikipedia/0.pkl
new file mode 100644
index 0000000..5ee94da
--- /dev/null
+++ b/embeddings/wikipedia/0.pkl
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:301582dabd8c6ac7bdf626c7e4a1d64c8f9665b65b6334b44642bdfb78054575
+size 588838774
我对 GitHub,尤其是 LFS 的用户不是很自信。所以,问题是:我做错了什么还是真的意味着文件在服务器上不存在?

最佳答案

此错误消息是 HTTP 404 Not Found 错误。本质上,这意味着 Git LFS 试图 pull 下文件,但它不存在。很可能,用户没有正确上传它,可能是因为他们没有运行 git lfs install .如果他们运行了该命令,pre-push安装在他们的存储库中的钩子(Hook)会在上传 Git 对象之前将文件推送到服务器。
由于文件未上传,因此您无法下载它们。您必须要求作者运行 git lfs push --all在他们的存储库中将它们上传到正确的位置,以便可以下载它们。

关于git - 获取 git LFS 文件时出错 : Object does not exist on the server: [404] Object does not exist on the server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62852772/

相关文章:

git - 为什么 Git 不识别我的 .gitignore 排除项?

git - "Reinitialized existing Git repository"消息位于全新目录中

javascript - 如何在 git 中接受他们的更改

git 分支删除 - HOOK

git - 如何将特定的 git-lfs 文件下载到 Docker 容器中

java - 在多个分支中使用分支

python - 用户帐户的 Github API 调用

git - 可视化 github 上的 git 仓库

jenkins 中的 Git LFS 设置

git - 将 git 目录从一个支持 LFS 的仓库移动到另一个(也是 LFS)