You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
P2We'll consider working on this in future. (Assignee optional)team-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: feature request
http_archive should support retrieving resources which require authentication
Feature requests: what underlying problem are you trying to solve with this feature?
I want to use http_archive to download tar.gz from a private github repository since from our benchmarks this is ~25% faster than using git_repository with shallow-since (we use a specific commit)
Our suggestion is to use the popular netrc format and have http_archive read it (if exists and indicated that its usage is desired) and use it to authenticate (basically build the relevant authentication header).
Any other information, logs, or outputs that you want to share?
this was discussed with @aehlig and @dslomov which agreed http_archive should support authentication
Reacted by Christopher Bayliss, xiaoliuzi, Jonathon Belotti, Peter Mounce and Robin Tweedie
We keep third party deps in a GCS bucket. What options for authenticating do we have? It's not clear to me that .netrc can suffice here, and I'm unfamiliar with how I'd automate getting credentials from gcloud to a form usable by bazel here.
P2We'll consider working on this in future. (Assignee optional)team-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: feature request
Activity
buchgr commentedon Mar 20, 2019
+1. I think this should integrate well with Bazel's existing authentication mechanisms.
dslomov commentedon Mar 21, 2019
@dkelmer wdyt? related to #7469
dkelmer commentedon Mar 26, 2019
I'll look into
netrc, thanks for the tip @ittaiz@buchgr, which existing authentication mechanisms are you referring to?
buchgr commentedon Mar 28, 2019
@dkelmer BES and Remote Execution support --google_* authentication flags and soon --aws_* authentication flags. We also have a common abstraction that ideally remote repos would utilize: https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/runtime/AuthHeadersProvider.java?q=AuthHeadersProvider.java
ittaiz commentedon May 2, 2019
@dkelmer please note #7978 which is under @aehlig’s mentoring
keith commentedon Sep 4, 2019
Related #9327
meisterT commentedon May 12, 2020
What's left to do here?
petemounce commentedon Nov 23, 2022
We keep third party deps in a GCS bucket. What options for authenticating do we have? It's not clear to me that
.netrccan suffice here, and I'm unfamiliar with how I'd automate getting credentials fromgcloudto a form usable by bazel here.tjgq commentedon Nov 23, 2022
See #15013. We are planning to add credential helper support to
http_archive.tjgq commentedon Mar 7, 2023
Deduplicating against #15013.