问题
I pushed .png
files, each of which is 2+MB file size and tracked by git-lfs
, to my gitlab.com repository, say repo_a
. In CI job on another repo repo_b
where git-lfs
is installed, repo_a is cloned. Now I see the size of all .png files are 132, which seems to be the same volume as sha
output (as the following. Note: some values are populated for privacy):
$ git show HEAD:file-a.png | tee sha_temp
version https://git-lfs.github.com/spec/v1
oid sha256:shashashaaaashashashaaaashashashaaaashashashaaaashashashaaaa
size 2430019
$ ls -l sha_temp
-rw-rw-r-- 1 crookednoodle crookednoodle 132 Nov 7 05:35 sha_temp
However, On my computer instead on Gitlab CI, I can see the original files when I git clone
the repo_a.
This makes me feel that the content of these files are still pointers, not the original files. I also noticed that on my computer, I see in the output the original files are downloaded like this:
Downloading file-a.png (2.5 MB)
But I don't see this in the output on CI job.
Obviously related, subsequent process that opens the images by OpenCV fails.
What is wrong?
回答1:
Managed to solve (get around) the issue by myself. In the targeted repo, I modified the CI script to run git lfs pull
.
来源:https://stackoverflow.com/questions/47159392/git-only-clones-sha-for-lfs-files-on-gitlab-ci