Github Maven包可以';在组织中找不到

Github Maven包可以';在组织中找不到,maven,gradle,github,github-package-registry,Maven,Gradle,Github,Github Package Registry,我试图将Github包用作maven存储库 当我直接指向这样的回购时: repositories { maven { url = uri("https://maven.pkg.github.com/ORG/REPO") credentials { username = 'some-user' password = 'github-token-with-repo-scope' } } }

我试图将Github包用作maven存储库

当我直接指向这样的回购时:

repositories {
    maven {
        url = uri("https://maven.pkg.github.com/ORG/REPO")
        credentials {
            username = 'some-user'
            password = 'github-token-with-repo-scope'
        }
    }
}
然后像这样拉依赖项:

dependencies{
    implementation 'groupId:artifcatId:1.0.0-snapshot'
}
它起作用了

但如果我不想将maven url限制为特定的回购协议,而直接使用OrgURL

url = uri("https://maven.pkg.github.com/ORG')
它不会发现同样的人造物说:

Could not find groupId:artifcatId:1.0.0-snapshot.
我已尝试将REPO名称添加到依赖项声明中

dependencies{
    implementation 'REPO:groupId:artifcatId:1.0.0-snapshot'
}
还是不行

任何人都知道如何使用OrgURL作为MAVEN存储库,而不是在每个repo中添加多个url(以及成倍增加登录调用等)


谢谢

我从github支持部门得到了一个答案,他们已经解决了这个问题:)

你好,马克, 很抱歉耽误了回复您的时间!我一直在处理一些被搁置的票

此问题现已修复

您不能使用,但可以对正常版本和快照版本使用以下URL

url=uri(“https://maven.pkg.github.com/ORG/*“”

我们本想允许,但没有办法区分groupId和repo名称

问候,, 杰米


另外,感谢Jamie的更新:)

IIRC,您需要传递一个访问令牌才能访问GitHub包注册表:@Edric我确实传递了一个,正如您从第一段代码中看到的。