Using GitHub Packages with Apache Ivy


I’m using Apache Ivy to manage dependencies for my project and I’m trying to add a GitHub Package as one of the dependencies.

Has anyone successfully gotten this to work? I can’t seem find the right configuration for the GitHub resolver in my ivysettings.xml file.

Here is the package I’m trying to add: Package org.voyant-tools.trombone · voyanttools/trombone · GitHub

Here is the dependency entry:

<dependency org="voyanttools" name="trombone" rev="5.2.1" />

And here is my ivysettings.xml file:

    <settings defaultResolver="ibiblio"/>
        <ibiblio name="ibiblio" />
        <url name="github" m2compatible="true">
            <artifact pattern="[organisation]/[module]/[artifact]-[revision].[ext]" />
        <module organisation="voyanttools" name="*" resolver="github" />
    <property name="github.user" value="foo" override="false" />
    <property name="github.token" value="bar" override="false" />
    <credentials host="" realm="GitHub Package Registry" username="${github.user}" passwd="${github.token}" />

(I am passing my actual GitHub username and PAT via the command line.)

Here’s the debug output I’m getting when running ivy:

[ivy:retrieve] try to get credentials for: GitHub Package
[ivy:retrieve] authentication: k='GitHub Package' c='GitHub Package ajmacdonald/****************************************'
Class loaded from parent loader (parentFirst)
[ivy:retrieve] HTTP response status: 422 url=
[ivy:retrieve] CLIENT ERROR: Unprocessable Entity url=
[ivy:retrieve] 	github: resource not reachable for voyanttools#trombone;5.2.1: res=
[ivy:retrieve] 	github: no ivy file nor artifact found for voyanttools#trombone;5.2.1
[ivy:retrieve] WARN: 	module not found: voyanttools#trombone;5.2.1
[ivy:retrieve] WARN: ==== github: tried
[ivy:retrieve] WARN:   -- artifact voyanttools#trombone;5.2.1!trombone.jar:
[ivy:retrieve] WARN:

Any help or pointers would be greatly appreciated!