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
{{ message }}
Repository navigation
Support authentication for repository_ctx.download #7469
The API of repository_ctx.download doesn't allow to supply authentication information.
Feature requests: what underlying problem are you trying to solve with this feature?
I need to be able to download from an url that requires authentication. At a very minimum BASIC authentication should be supported.
Ideally, it would be nice to supply authentication information in a central file for all Bazel builds and independent/decoupled from Bazel BUILD and WORKSPACE files checked into Git.
Reacted by Christian Edward Jackson-Gruber, Markus Padourek, Robbert van Ginkel, Milan Plžík and xiaoliuzi
Current Bazel documentation about repository_ctx.download's authentication is rather poor. I already spent literaly a handful of hours trying to make it work.
Current Bazel documentation about repository_ctx.download's authentication is rather poor. I already spent literaly a handful of hours trying to make it work.
I would like to use a Bearer token here instead of basic auth. Is this possible? I need to access a private company maven repository.
Documentation is pretty poor at this point only mentioning that there is a "type" which can be "basic".
@aehlig It seems you've proposed and implemented the auth feature. Could you give some more insights? Thanks!
Activity
excitoon commentedon Feb 20, 2019
I would even ask for not only Basic but NTLM/SSPI authentication.
dkelmer commentedon Mar 26, 2019
Related bugs
bug in starlark maven jar
http archive authentication
remove native maven jar
more http authentication
authentication in jvm_import_external rules, want m2 settings
expose sha1
repository cache for git
jin commentedon Jul 10, 2019
Thanks to @aehlig's work, repository_ctx.download now supports authentication through netrc.
aehlig commentedon Jul 10, 2019
This is indeed implemented as per the approved design on adding authentication to downloads in commits 24cf645, 38cfc18, e1e074c, and c26e339.
igorgatis commentedon Mar 9, 2021
Current Bazel documentation about
repository_ctx.download's authentication is rather poor. I already spent literaly a handful of hours trying to make it work.cristifalcas commentedon Mar 16, 2021
Please share how to do it :)
koenverwimp commentedon Nov 21, 2021
@igorgatis Could you please share your findings?
@cristifalcas Did you find a solution in the mean time?
tomml commentedon Aug 23, 2023
I would like to use a Bearer token here instead of basic auth. Is this possible? I need to access a private company maven repository.
Documentation is pretty poor at this point only mentioning that there is a "type" which can be "basic".
@aehlig It seems you've proposed and implemented the auth feature. Could you give some more insights? Thanks!