0

We are doing a test install of gitea and trying to use the gitea lfs to s3 feature. The configuration is straightforward and we did it like that:

[lfs]
#PATH = /opt/gitea/data/lfs
STORAGE_TYPE = minio
MINIO_ACCESS_KEY_ID = KEY
MINIO_SECRET_ACCESS_KEY = SECRET
MINIO_BUCKET = NAME
MINIO_LOCATION = us-east-1
MINIO_USE_SSL = true
SERVE_DIRECT = true
MINIO_ENDPOINT = s3.us-east-1.amazonaws.com

That works, I created a repo and cloned another I had at disposal with lfs config. I managed to commit and push all my lfs files and it uploaded everything on the s3. So that's great.

But now I have an issue when cloning the repo, the clone does get the git files but when trying to get the lfs files on the s3 I get this message:

Error downloading object: FILE (hash): Smudge error: Error downloading  FILE (hash): LFS: Get "https://NAME.s3.dualstack.us-east-1.amazonaws.com/lfs/PATHTOFILE": dial tcp: lookup NAME.s3.dualstack.us-east-1.amazonaws.com on IP:53: dial udp IP:53: socket: too many open files

From what I get it's only trying to get one file but even that doesn't work.

Has anyone seen that before?

1 Answers1

0

I was having the same issue, though I'm not sure what the root cause is. It appears that something in the git-lfs client doesn't like the direct/signed S3 URLs gitea is serving.

My solution was setting SERVE_DIRECT = false, which basically proxies all the LFS objects back through gitea before returning them to the client.