rules_jvm_external
rules_jvm_external copied to clipboard
maven repository credential settings does not work (or missing correct example)
Description of the problem / feature request:
I try to use a maven repository which is protected with username and password. I got the tip that I may use the settings from coursier project. But also the documentation from this project has not helped me to solve the problem.
The only thing (which is ugly from a security point of view) is to set the username/password direct in the repositories definition like https://username:[email protected]
in the WORKSPACE file (and check this file into git).
Can you give a clean example of what to do to setup correct the credentials for a maven repository? It would be fine to use credentials.properties file or using environment variable COURSIER_CREDENTIALS or setup something in .bazelrc file.
Feature requests: what underlying problem are you trying to solve with this feature?
Using protected maven repositories.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Using a username/ password protected repository to download maven dependencies with bazel.
I have tried to following things (all them do not work):
- create a credentials.properties file under C:\Users\myUser.config\coursier\credentials.properties
- put something like this into the file:
username=YYYY password=XXXXX host=https://my.protected.io/nexus/content/groups/public auto=true
- try to download the maven dependencies (now I get
unauthorized
errors)
The next thing I tried like from another issue https://github.com/bazelbuild/rules_jvm_external/issues/80 is to setup maven user name and password through .bazelrc file ... this fails also.
I tried also using coursier environment variable like this:
- env$:COURSIER_CREDENTIALS='my.protected.io username:password'
What operating system are you running Bazel on?
Windows 10
What's the output of bazel info release
?
Replace this line with your answer.
If bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.
release 1.0.0