jasonwhite / rudolfs

A high-performance, caching Git LFS server with an AWS S3 and local storage back-end.
MIT License
392 stars 39 forks source link

Connect to Google Cloud Storage #63

Open ItamarSmirra opened 10 months ago

ItamarSmirra commented 10 months ago

Hi! Is it possible to add another env variable for S3_HOSTNAME or something like that? It is required for connecting the server to other storage host rather then AWS (Google for example); Thank you!

jasonwhite commented 10 months ago

Does AWS_S3_ENDPOINT work? For example:

AWS_S3_ENDPOINT=https://myendpoint.com:8080
ItamarSmirra commented 10 months ago

It does seem to affect the connecting process and not returning the Invalid Credentials error, but now I am getting the following error: Screenshot_20240123-122052_Chrome.jpg

Any ideas?

jasonwhite commented 10 months ago

I did a little searching for that unspecific protocol error detected message and I believe it is because Google is picky about the http2 headers it receives. The AWS S3 library Rudolfs uses (Rusoto) might not be setting the correct http2 headers (like :scheme and :authority). See https://github.com/rusoto/rusoto/pull/1985.

I'm not aware of anyone else successfully using Rudolfs with GCP via the S3 API. It would probably be better to add GCP support as its own backend.

I don't have any time to debug this further or implement GCP support, but I would be happy to shepherd any pull requests.