All this mocking when moto exists is just :-( <a href="https://github.com/awslabs/git-remote-s3/blob/v0.1.19/test/remote_test.py">https://github.com/awslabs/git-remote-s3/blob/v0.1.19/test/r...</a><p>Actually, moto is just one bandaid for that problem - there are SO MANY s3 storage implementations, including the pre-license-switch Apache 2 version of minio (one need not use a bleeding edge for something as relatively stable as the S3 Api)
This is something I was trying to implement myself. I am surprised it can be done with just an s3 bucket. I was messing with API Gateways, Lambda functions and DynamoDB tables to support the s3 bucket. It didn't occur to me to implement it client side.
I might have stuck a bit too much to the lfs test server implementation. <a href="https://github.com/git-lfs/lfs-test-server">https://github.com/git-lfs/lfs-test-server</a>
If you are interested in using S3 as a git remote but are concerned with privacy, I built a tool a while ago to use S3 as an untrusted git remote using Restic. <a href="https://github.com/CGamesPlay/git-remote-restic">https://github.com/CGamesPlay/git-remote-restic</a>
Just remember, the mininum billing increment for file size is 128KB in real AWS S3. So your Git repo may be a lot more expensive than you would think if you have a giant source tree full of small files.
<a href="https://alanedwardes.com/blog/posts/serverless-git-lfs-for-game-dev/" rel="nofollow">https://alanedwardes.com/blog/posts/serverless-git-lfs-for-g...</a><p>I’ve used this guy’s CloudFormation template since forever for LFS on S3.<p>GitHub has to lower its egregious LFS pricing.
You can also do this with Cloudflare Workers for fewer setup steps/moving parts:<p><a href="https://github.com/milkey-mouse/git-lfs-s3-proxy">https://github.com/milkey-mouse/git-lfs-s3-proxy</a>
I'm surprised they just punt on concurrent updates [0] instead of locking with something like dynamodb, like terraform does.<p>[0] <a href="https://github.com/awslabs/git-remote-s3?tab=readme-ov-file#concurrent-writes">https://github.com/awslabs/git-remote-s3?tab=readme-ov-file#...</a>
I’ve been using <a href="https://github.com/jasonwhite/rudolfs">https://github.com/jasonwhite/rudolfs</a> - which is written in rust. It’s high performance but doesn’t have all the features (auth) that you might need.
This seems wrong, since you can't push transactionally + consistently in S3.<p>They address this directly in their section on concurrent writes: <a href="https://github.com/awslabs/git-remote-s3?tab=readme-ov-file#how-s3-remote-work">https://github.com/awslabs/git-remote-s3?tab=readme-ov-file#...</a><p>And in their design: <a href="https://github.com/awslabs/git-remote-s3?tab=readme-ov-file#how-s3-remote-work">https://github.com/awslabs/git-remote-s3?tab=readme-ov-file#...</a><p>But it seems like this is just the wrong tool for the job (hosting git repos).