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

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

hdljh 回答:Gradle无法从Github软件包注册表下载软件包

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3053407.html

大家都在问