Gradle无法从Github包注册表下载包

Gradle无法从Github包注册表下载包,gradle,github-package-registry,Gradle,Github Package Registry,使用gradle works上载公共软件包: 但我无法下载它。我试过不同的方法,但都不管用 根据文件规定,正确的URL-s应为: repositories { maven { url "https://maven.pkg.github.com/ttiganik/hrd-java-test-registry" credentials { username = System.properties['hmGithubUser']

使用gradle works上载公共软件包:

但我无法下载它。我试过不同的方法,但都不管用

根据文件规定,正确的URL-s应为:

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'
}
凭据与上载的凭据相同

gradle installDebug
说它从正确的位置查看:

> 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:
但它没有安装它

如果我在maven存储库中注释掉凭证,它会说401未经授权。因此,位置似乎是正确的


我的GPR配置有什么问题?

读了这篇文章后,我怀疑您需要GitHub上的READ token来拉包: