我已经有了一个没有LFS的本地裸git存储库,只是为了共享git,就像它应该做的那样。
这个git将用于存储大图像(奇点图像),而我的repo已经很大(6 GB)。但是,我并不特别想部署一个API或其他服务器来使用LFS,所以我想在本地安装。这是可能的吗?可以租吗?当我们使用这个的时候,我们可以使用git拉动的奇点图像吗?我在互联网上搜索了一个教程,我找到了这个Initialize bare git repository with LFS,但它并不符合我的等待,它是关于一个API的。
我已经在另一个存储库上尝试了,但当我尝试推送时,出现了以下错误消息:
$ git push
hint: The remote resolves to a file:// URL, which can only work with a
hint: standalone transfer agent. See section "Using a Custom Transfer Type
hint: without the API server" in custom-transfers.md for details.
Remote "origin" does not support the LFS locking API. Consider disabling it with:
$ git config lfs.file:///data/shared.git/info/lfs.locksverify false
Uploading LFS objects: 0% (0/1), 0 B | 0 B/s
hint: The remote resolves to a file:// URL, which can only work with a
hint: standalone transfer agent. See section "Using a Custom Transfer Type
hint: without the API server" in custom-transfers.md for details.
batch request: missing protocol: "file:///data/shared.git/info/lfs"
error: impossible to push references to '/data/shared.git'
/data/shared.git存储库是我的裸存储库。我查看了“在没有API服务器的情况下使用自定义传输类型”一节,但我不理解它,我认为自定义传输是针对第三方库存服务器的。我不想要它在这里。
$ git lfs env
git-lfs/2.8.0 (GitHub; linux amd64; go 1.12.6)
git version 2.17.1
Endpoint=file:///data/shared.git/info/lfs (auth=none)
LocalWorkingDir=/data/sing
LocalGitDir=/data/sing/.git
LocalGitStorageDir=/data/sing/.git
LocalMediaDir=/data/sing/.git/lfs/objects
LocalReferenceDirs=
TempDir=/data/sing/.git/lfs/tmp
ConcurrentTransfers=3
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=/data/sing/.git/lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic
UploadTransfers=basic
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"
感谢您的帮助,谢谢!
发布于 2019-07-31 22:50:25
我会回答我自己的问题,是的,可以在没有API的情况下使用git lfs。响应在github上,这个地址https://github.com/nathasm/git-lfs-rsync-agent或者这个地址https://github.com/sinbad/lfs-folderstore是一些例子(我想)。即使有些文档很便宜。
对于rsync,我建议使用nathasm存储库,而不是Aleb git,因为在存储库中计入大文件时会出现错误。此错误:是涂抹错误:下载对象时出错…无效的跨设备链接。在这个git lfs-folderstore上,也有同样的错误。
但是我已经用rsync one做过了。
谢谢大家,祝你们今天愉快。
https://stackoverflow.com/questions/57254411
复制相似问题