Skip to content

Support authentication for repository_ctx.download #7469

Closed

Description

@guw

Description of the problem / feature request:

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.

Activity

  1. added
    team-ExternalDeps
    untriaged
    on Feb 19, 2019
  2. excitoon commented on Feb 20, 2019

    @excitoon
    Contributor

    I would even ask for not only Basic but NTLM/SSPI authentication.

  3. added
    P1
    and removed
    untriaged
    on Feb 28, 2019
  4. assigned and unassigned on Jul 10, 2019
  5. jin commented on Jul 10, 2019

    @jin
    Member

    Thanks to @aehlig's work, repository_ctx.download now supports authentication through netrc.

  6. aehlig commented on Jul 10, 2019

    @aehlig
    Contributor

    This is indeed implemented as per the approved design on adding authentication to downloads in commits 24cf645, 38cfc18, e1e074c, and c26e339.

  7. added
    team-OSS
    on Jun 15, 2020
  8. igorgatis commented on Mar 9, 2021

    @igorgatis

    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.

  9. cristifalcas commented on Mar 16, 2021

    @cristifalcas

    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.

    Please share how to do it :)

  10. koenverwimp commented on Nov 21, 2021

    @koenverwimp

    @igorgatis Could you please share your findings?
    @cristifalcas Did you find a solution in the mean time?

  11. removed
    team-OSS
    on Nov 29, 2021
  12. tomml commented on Aug 23, 2023

    @tomml

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1team-ExternalDepstype: feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions