rules_jvm_external
rules_jvm_external copied to clipboard
Add support for use_credentials_from_home_netrc_file parameter with bzlmod
Currently the parameter use_credentials_from_home_netrc_file
is not supported when using rules_jvm_external
with bzlmod.
I need to re-read the code to check this, but I'm not sure we still need this attribute. The Bazel downloader will use values from $HOME/.netrc
, so pinned deps shouldn't be affected. In the case of the unpinned deps, I think (and this is what I need to check), that we now parse the .netrc
and use those credentials with coursier
, which we can make the default behaviour (to be consistent with the pinned case)
Thank you.
It looks like that currently for unpinned deps, credentials from .netrc
are not passed to coursier
by default.
Is there a workaround here or a plan to add this functionality back in?
Using the netrc file would be good, or using the new bazel auth helper would be nice too; however right now it is definitely broken; putting literal passwords in repository URLs is not viable.
Its a fairly straightforward patch, just another attribute on the tag, a logical_or over definitions of the same repo, and finally pass it into the existing coursier_fetch rule.
I went ahead and made the patch above. Works as expected in our setup ☝🏼