我在gitHub软件包注册表中有一个jar,名为test.jar(版本:1.0.5),存储库名称为testRepo,所有者名称:tejas3108。
我正在尝试将此jar作为依赖项添加到我的其他gradle项目中,但是使用正确的凭据,我仍然收到此消息:Could not GET 'https://maven.pkg.github.com/tejas3108/com.tejas/1.0.5/testRepo-1.0.5.pom'. Received status code 422 from server: Unprocessable Entity.
将其粘贴到浏览器中将显示以下消息:maven文件的无效路径。
如何将这个jar从github注册表成功添加到我的build.gradle?这是我现在所拥有的:
repositories {
mavenCentral()
maven{
url = "https://maven.pkg.github.com/tejas3108"
credentials {
username = "tejas3108"
password = "<my_github_token>"
}
}
}
dependencies {
compile "com.tejas:testRepo:1.0.5"
}
您解决了吗?我有同样的问题。