Git Error:[XXX]Object does not exist on the server or you don't have permissions to access it

起因
1.某個遠端a分支開發完成了某功能,提交了LFS資源。
2.GitLab倉庫硬盤壞掉後恢復資源到備份盤。
3.新的分支b拉取遠端a分支,提交功能

結果:
自己新的分支b推送到遠端後,其他人拉取或檢出這個分支報錯,類似:

[28bbec36fe441b7de97d566872c71cd4542384d871b369168285408c1f062cfd] Object does not exist on the server or you don't have permissions to access it

解決方案
百度到某答案
https://stackoverflow.com/questions/35049603/git-lfs-files-not-found-on-server

在自己的b分支上,分別對每個LFS資源進行下列操作。

# git lfs push --object-id origin [oid] [oid] [oid]
$ git lfs push --object-id origin 28bbec36fe441b7de97d566872c71cd4542384d871b369168285408c1f062cfd

驗證其他人的拉取或檢出結果,正常!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章