使用 gradle 上传公共包作品: https ://github.com/ttiganik/hrd-java-test-registry/packages/61312
但我无法下载它。我尝试了不同的 URL-s 和包名称,但它们都不起作用。
根据文档,正确的 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 unauthorized。所以位置似乎是正确的。
我的 GPR 配置有什么问题?