Repository navigation
Add a design for authoritative http downloads using .netrc - #115
Conversation
aehlig
left a comment
There was a problem hiding this comment.
Thanks. The document looks good. Can you please also add a line to README.md which serves as an index of all design documents, putting it to "under review".
|
|
||
| We will add the following properties to _http_archive_ rule and `SkylarkRepositoryContextApi.downloadAndExtract`: | ||
| - netrc_file_path : String | ||
| - the location of the _.netrc_ file. Default will be the user home directory if not supplied |
There was a problem hiding this comment.
"the user home directory" or "the file .netrc in the user's home directory"?
There was a problem hiding this comment.
clarified:
"Default location for the .netrc file will be the user home directory, e.g. /Users/<username>/.netrc"
Added a row in the README.md, I have put the Category as External Repositories, hope it is the correct one :) |
Yes, that's the correct one. |
|
@aehlig Should I announce it on |
|
I like where you are going with the path prefixing, so that different URLs can get different access. Have you considered an approach where the URL -> credential information is done in it's own rules, and then http_archvie (and maven rules, etc.) can (transparently) use that for the download. Something like |
|
Looks like a good idea, a separate rule for globally define the authorization types per domain / host, since there will be only one .netrc configuration globally anyways (most probably). |
|
@aiuto Interesting! |
|
Related discussion on the mailing list: https://groups.google.com/forum/#!topic/bazel-dev/oXSQfq7W0jM |
How would such an approch handle conflicting definitions? If it should be transparent, the rules cannot be passed the name of the authorization repository. But if you have several |
|
We would either allow only one add_authorization() or last one wins. Only having one should be sufficient. I |
http-archive rule does not have an ability to download from urls which require authorization.
This proposal describes how to make additions to the API to allow various standard / custom protocols using the .netrc file as storage for the credentials / tokens.