I have a MinIO server that I have set up as follows (docker compose):
services:
minio:
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ACCESS_KEY: <your-access-key>
MINIO_SECRET_KEY: <your-secret-key>
volumes:
- ./data:/data
command: server /data --console-address :9001
As far as I can see, so far so good. I have created a bucket with the name git-lfs
, and I can test the thing as follows:
$ ~/Downloads/mc.exe ls my-minio
[2023-05-03 09:35:41 CEST] 0B git-lfs/
It seems as if I have access.
I have the following section in my git config:
[lfs]
locksverify = false
storage = minio
url = http://10.0.10.196:9000/git-lfs
accesskey = <your-access-key>
secretkey = <your-secret-key>
repositoryformatversion = 0
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge --skip -- %f
process = git-lfs filter-process --skip
required = true
The access key and secret key have been redacted from this post.
So... the trouble is, that whenever I try to push anything that should go onto the lfs server, I get the following response:
$ git push origin lfsstuff
Uploading LFS objects: 0% (0/6), 0 B | 0 B/s, done.
batch response: Client error: http://10.0.10.196:9000/git-lfs/objects/batch
error: failed to push some refs to 'git+ssh://my-git-server-here/~/Repositories/ProjectHere.git'
The bucket is still empty, and the response I get from http://10.0.10.196:9000/git-lfs/objects/batch
is:
<Error>
<script/>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>objects/batch</Key>
<BucketName>git-lfs</BucketName>
<Resource>/git-lfs/objects/batch</Resource>
<RequestId>175BEAF87C025894</RequestId>
<HostId>e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</HostId>
</Error>
So, clearly something is up with either the write access, or a missing key. But I don't know how to move on to debug or fixing it. From all the documentation I can find, this should already be working.. it just isn't.
Any pointers you can give will be highly appreciated.
EDIT:
As larsks suggests, MinIO doesn't actually support the git lfs api.
I would love to put a compatible server in between, like outlined here (jasonwhite/rudolfs on github), but I can't seem to get that to work. I've added a question in rudolfs discussions on github.