20220304记录
lfs : large file storage
安装
最新版本git-lfs 3.0.2要求libc6 高于2.32,而Ubuntu20.04默认的libc6版本是2.31,不支持安装git lfs 3.0.2
因此Ubuntu20.04版本安装git lfs 3.0.1版本,Ubuntu16.04可安装git lfs 2.13.3版本
使用
git lfs track *.so
执行之后自动生成.gitattributes,此文件记录需要lfs跟踪的文件、文件类型
git add .gitattributes
git add .
git add file.iso
git commit -m “Add disk image”
git push
Gerrit使能lfs
如果不经过gerrit,那上面是可以正常push成功,可是中间经过gerrit,那push时就会有错误提示如下:
batch response: Fatal error: LFS is not available for repository
batch response: Repository or object not found: http://…/objest/batch
因此,Gerrit需要安装lfs plugin和使能lfs功能。方法如下:
lfs插件安装:忘了,后补
ssh -p 29418 xxx@localhost gerrit plugin -h
ssh -p 29418 xxx@localhost gerrit plugin install lfs.jar
lfs插件使能
gerrit etc/gerrit.config增加:

本文档记录了在Ubuntu 20.04上安装Git LFS 3.0.1以绕过版本不兼容问题的过程,以及在Gerrit中启用LFS插件的步骤。在遇到Gerrit推送LFS文件失败时,通过安装和配置LFS插件解决了问题。此外,还解决了从Harmony镜像下载LFS数据的难题,包括从Gitee下载代码、将LFS数据推送到个人Gerrit仓库,并执行`git lfs pull`获取源文件。最后,提到了在执行`git lfs pull`时遇到的`git-lfs-authenticate`报错,并给出了可能的解决方案。


被折叠的 条评论
为什么被折叠?



