buchgr / bazel-remote

A remote cache for Bazel
https://bazel.build
Apache License 2.0
576 stars 150 forks source link

Support basic HTTP authentication for remote asset API #761

Open JSGette opened 4 weeks ago

JSGette commented 4 weeks ago

I have started bazel-remote with remote asset API enabled to use as a read-through cache for Artifactory that requires authentication. Obviously, it fails to work because I didn't set any credentials for Artifactory. It would be sufficient (in my case at least) to support basic authentication.

This is the command that I used to start bazel-remote: ./bazel-remote-2.4.4-linux-x86_64 --dir=/bazel_cache/bazel_remote --grpc_address=localhost:9092 --experimental_remote_asset_api --max_size=50

And this is the error that I get (401 obviously): 2024/06/27 11:39:32 GRPC ASSET FETCH <artifactory_url>.zip 401 Unauthorized