title: In Bazel, fetching jar from private maven repository fails with 403
body: <p>I am trying to build a simple java project with Bazel, using rules_jvm_external. Some of the dependencies are kept in a private maven repository. 
  My WORKSPACE looks like this:</p>
  
  <pre><code>load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
  
  RULES_JVM_EXTERNAL_TAG = "3.2"
  RULES_JVM_EXTERNAL_SHA = "82262ff4223c5fda6fb7ff8bd63db8131b51b413d26eb49e3131037e79e324af"
  
  http_archive(
      name = "rules_jvm_external",
      strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
      sha256 = RULES_JVM_EXTERNAL_SHA,
      url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
  )
  
  load("@rules_jvm_external//:defs.bzl", "maven_install")
  
  maven_install(
      name = "maven_deps",
      artifacts = [
          "org.projectlombok:lombok:1.18.12",
          "mygroup:myartifact:version"
      ],
      repositories = [
          "https://repo1.maven.org/maven2",
          "https://username:password@my.repo.io/artifactory/repo",
      ],
  )
  </code></pre>
  
  <p>My BUILD looks like this:</p>
  
  <pre><code>java_library(
      name = "mylib",
      srcs = glob([
          "proj/src/main/java/**/*.java"
      ]),
      deps = [
          "@maven_deps//:org_projectlombok_lombok",
          "@maven_deps//:mygroup_myartifact",
      ],
  )
  </code></pre>
  
  <p>When i run <code>bazel build //:mylib</code> the fetching of mygroup:myartifact:version from the private maven repository fails with http error code 403. I hardcoded the username and password for simplicity. The username used is an email so i encoded it, e.g.: <code>me%40gmail.com</code>. 
  I am using bazel version 3.1.0. 
  Passing the username and password through env vars produced the same error.
  Fetching the same jar using curl works great:</p>
  
  <pre><code>curl -O 'https://me%40gmail:PASSWORD@my.repo.io/artifactory/repo/mygroup/myartifcat-version.jar'
  </code></pre>
  
  <p>Can anyone see what the problem is?
  Thank you in advance!</p>