[尝试将github注册表中的maven包添加到gradle文件时获取422:不可处理的实体

问题描述 投票:1回答:1

我在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"
}
build.gradle github-package-registry
1个回答
0
投票

您解决了吗?我有同样的问题。

© www.soinside.com 2019 - 2024. All rights reserved.