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

时间:2019-11-22 04:08:30

标签: gradle github-package-registry

使用gradle作品上传公共软件包: https://github.com/ttiganik/hrd-java-test-registry/packages/61312

但是我无法下载它。我尝试了不同的URL-s and package names,但是它们都不起作用。

根据文档,正确的URL应该是:

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配置有什么问题?

0 个答案:

没有答案