Github package registry authentication

I’m using a bespoke dependency management tool that uses the Aether library to manage maven dependencies.

I’d like to integrate support for deploying to github package registry, but I’m not sure what authentication information is required from github.

I assume it’s a matter of setting the right fields on anAether Authentication object.

From looking at what information maven requires I see an entry in the settings.xml


Which suggests I only need to set strings “username” and “password”

Despite having set these fields (along with the correct url) I keep getting an error similar to the following

org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact group:a:jar:1.0 from/to github ( failed to respond

Any guidance would be much appreciated.

I’m not sure what that error is exactly. For the server config we recommend using env variables as seen in setup-java. Where the password is a PAT and the username is your github username.

1 Like