简体   繁体   English

git只为Gitlab CI上的LFS文件克隆sha

[英]git only clones sha for LFS files on Gitlab CI

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 . 我将.png文件推送到我的gitlab.com存储库中,每个文件大小均为2 + MB,并由git-lfs跟踪,例如repo_a In CI job on another repo repo_b where git-lfs is installed, repo_a is cloned. 在另一个安装了git-lfs repo_b上的CI作业中,克隆了repo_a。 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): 现在,我看到所有.png文件的大小为132,这似乎与sha输出的体积相同(如下所示。注意:出于隐私目的,填充了一些值):

$ 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. 但是,在我的计算机上而不是在Gitlab CI上,我在git clone 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. 但是我在CI作业的输出中看不到这一点。

Obviously related, subsequent process that opens the images by OpenCV fails. 显然相关,通过OpenCV打开图像的后续过程失败。

What is wrong? 怎么了?

Managed to solve (get around) the issue by myself. 设法自己解决(解决)问题。 In the targeted repo, I modified the CI script to run git lfs pull . 在目标存储库中,我修改了CI脚本以运行git lfs pull

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM