cvzx
cvzx

Reputation: 17

Migrating existing git lfs repo to new - error: GH008: Your push referenced at least 2 unknown Git LFS objects:

I have my base github repo where I initialized git lfs. I believe that it uses this free git lfs server from github. Now I have some large binary files so I wanted to migrate all my lfs files to my new lfs server, but keep github repo unchanged. So I did git lfs fetch --all then git lfs pull so I pulled all my LFS files from basic git lfs server, then I changed URL in .lfsconfig to my new git server and I did git pull. I can see on my server that I pulled all files to new server. But the problem is when I want to git lfs track, git add new file, after git push I got an error:

error: GH008: Your push referenced at least 1 unknown Git LFS object:
remote:     e85a0aa401550979e1206c3dd759e369e3067883c96a77ce6d7a8693ffa67f72

I tried all these answers from other similar questions but it not work. I tried:

git lfs fetch --all 
git lfs push --all 
git add --renormalize path/to/file

The problem is that I have this binary file in my path .git/lfs/objects/e8/5a/e85a0aa401550979e1206c3dd759e369e3067883c96a77ce6d7a8693ffa67f72 and this file already exist in my git lfs server as well (I believe it was pushed when I used git lfs push --all) but I cannot upload a pointer lfs file to my github repo. File .lfsconfig contains only URL to my LFS server and this is the output for git config --list | grep lfs:

filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
lfs.contenttype=0
lfs.repositoryformatversion=0
lfs.allowincompletepush=true
lfs.https:<URL github>/info/lfs.access=basic
lfs.https:<URL server git lfs>local.locksverify=false
branch.<branch name>.remote=origin
branch.<branch name>.merge=refs/heads/<branch name>

Upvotes: 0

Views: 140

Answers (0)

Related Questions