Reputation: 415
I downloaded and installed Git Large File Storage. Now I'm trying to get lfs files from the existing repository in github (not mine). I tried:
git lfs clone https://github.com/xxx/xxx
then in my local just cloned repo:
git lfs fetch --all
git lfs pull
I also tried the same but without "lfs".
The repository is cloned but for all lfs files always this error is shown:
[301582dabd8c6ac7bdf626c7e4a1d64c8f9665b65b6334b44642bdfb78054575] Object does not exist on the server: [404] Object does not exist on the server
and then:
error: failed to fetch some objects from 'https://github.com/xxx/xxx.git/info/lfs'
As a result, instead of real large files, their small pointers that can be seen in GitHub itself are cloned.
At the same time this command:
git log --all -p -S 301582dabd8c6ac7bdf626c7e4a1d64c8f9665b65b6334b44642bdfb78054575
gives the following results:
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
I am not very confident user of GitHub, especially, of LFS. So, the question is: am I doing something wrong or does it indeed mean that the files do not exist on the server?
Upvotes: 27
Views: 53273
Reputation: 211
If you are migrating from one GIT repo to another, you'll need to fetch the full LFS history from the source repo and push the full LFS history to a new (empty) target repo to avoid missing lfs objs. My steps to migrate from source repo to target repo:
Clone from source repo and download full LFS history
git clone http://source... local_src
cd local_src
git lfs fetch --all
Push to new target repo and upload full LFS history
git remote set-url origin https://target...
git push --mirror origin
git lfs push origin --all
Upvotes: 21
Reputation: 76559
This error message is an HTTP 404 Not Found error. Essentially, that means that Git LFS tried to pull down the file, but it wasn't there. In all likelihood, the user did not upload it properly, possibly because they didn't run git lfs install
. If they had run that command, the pre-push
hook installed in their repository would have pushed the files to the server before the Git objects were uploaded.
Since the files weren't uploaded, there's no way for you to download them. You'll have to ask the author to run git lfs push --all
in their repository to upload them to the proper location so they can be downloaded.
Upvotes: 29