Score:0

GIt lfs on s3 using gitea can't clone

fr flag

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?

Score:0
tr flag

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.

Erik J. Olson avatar
tr flag
So while this workaround is the only solution for gitea v1.7.3, it looks like there was a regression introduced at some point between [1.15.8 and now](https://github.com/go-gitea/gitea/issues/21525). It should be [fixed in 1.18.0](https://github.com/go-gitea/gitea/pull/21531).
night-gold avatar
fr flag
Totally forgot that I had posted here... I also created an issue on gitea github and gave the workaround there also. will still accept your answer ;)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.