title: Gradle fails to download package from Github Package Registry
body: <p>Uploading the public package with gradle works:
  <a href="https://github.com/ttiganik/hrd-java-test-registry/packages/61312" rel="noreferrer">https://github.com/ttiganik/hrd-java-test-registry/packages/61312</a></p>
  
  <p>But I am unable to download it. I tried different <a href="https://stackoverflow.com/questions/58398575/accessing-private-maven-github-package-registry-with-gradle">URL-s and package names</a>, but none of them work.</p>
  
  <p>According to documentation the correct URL-s should be:</p>
  
  <pre><code>repositories {
      maven {
          url "https://maven.pkg.github.com/ttiganik/hrd-java-test-registry"
          credentials {
              username = System.properties['hmGithubUser']
              password = System.properties['hmGithubToken']
          }
      }
  }
  
  dependencies {
      implementation 'com.ttiganik:test:1.0.0'
  }
  </code></pre>
  
  <p>The credentials are the same as for uploading. </p>
  
  <p><code>gradle installDebug</code> says it looks from the correct location:</p>
  
  <pre><code>&gt; Could not find com.ttiganik:test:1.0.0.
    Searched in the following locations:
      - https://maven.pkg.github.com/ttiganik/com/ttiganik/test/1.0.0/test-1.0.0.pom
      - https://maven.pkg.github.com/ttiganik/com/ttiganik/test/1.0.0/test-1.0.0.jar
    Required by:
  </code></pre>
  
  <p>but it doesn't install it.</p>
  
  <p>If I comment out the credentials in maven repository, it says 401 unauthorised. So the location seems to be correct. </p>
  
  <p>What is wrong with my GPR configuration?</p>