git only clones sha for LFS files on Gitlab CI

元气小坏坏 提交于 2020-01-24 12:33:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!