Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 2

GitHub package registry as Maven repo - trouble uploading artifact



I have followed the guide on

I create a dedicated machine user and created an access token with scopes "read:packages", "write:packages" and "repo" and configured my maven settings XML accordingly, as the guide describes.


When I do a mvn deploy it just gives me a 400 bad request error back:

org.apache.maven.wagon.TransferFailedException: Failed to transfer file: Return code is: 400, ReasonPhrase: Bad Request.

I wish it could be a little more verbose and reveal what part of the request that is invalid.


I don't know how to troubleshoot this further, so I'm hoping that someone here has experienced the same issue and found a solution or someone that can give me hint on how to troubleshoot in a good way. Running mvn in debug mode didn't give any helpful information either.

1 Reply
Community Manager
Message 2 of 2

Re: GitHub package registry as Maven repo - trouble uploading artifact

Hi @hyst-andreas,


Thank you for being here! 


Do your XML files have an XML declaration? If not, please add this to the top of your XML files and try again:

<?xml version="1.0" encoding="UTF-8"?>


Thanks for being here, sharing, and keeping our community awesome!

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!