Reputation: 181
I have already a local bare git repository without LFS, just for sharing the git, like it was supposed to.
This git will be utilized for stocking big images (singularity images) and my repo is already large (6 GB). However, I don’t particularly want to deploy an API or another server to use LFS, so I want to install locally. Is this possible ? It’s rentable ? When we use this, can we use the singularity images with a git pull? I search on the internet for a tutorial for that and I found this one Initialize bare git repository with LFS but it doesn’t correspond to my waiting, it’s talking about an API.
I already tried on another repository but when I attempted to push, there is this error message :
$ 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'
The /data/shared.git repository is my bare repository. I look in the section "Using a Custom Transfer Type without the API server" but I don't understand it, and I think the custom transfert is for a third part stockage server. I don't want it here.
$ 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"
Appreciate any help, thanks!
Upvotes: 8
Views: 3078
Reputation: 181
I will answer my own question, yes it’s possible to use git lfs without an API. The response is on github, this address https://github.com/nathasm/git-lfs-rsync-agent or this address https://github.com/sinbad/lfs-folderstore is some example (I think). Even if some documentation are cheap.
For rsync, I recommend the nathasm repertory, instead of Aleb git, because there is an error when you charge the large file on your repertory. This error: is Smudge error: Error downloading objects … invalid cross-device link. On this git lfs-folderstore, there is the same error.
But I have already done it with the rsync one.
Thank you, everyone, and have a good day.
Upvotes: 3