416 Range Not Satisfiable - Issue with using JIB or Docker Auths

Dear All,

I hope you are doing well.

I am currently facing an issue with Docker authentication on Windows that impacts my ability to use the Jib Maven Plugin to push images to my repository. Despite multiple attempts to log in, it seems my Docker credentials are not saved correctly. Specifically, the config.json file remains either empty or misconfigured, as shown:


   {
       "auths": {
           "https://index.docker.io/v1/": {}
       },
       "credsStore": "desktop"
   }

The problem arises when using the Jib Maven Plugin with the following configuration:

The build process results in the following warnings and errors:

[WARNING] Got output: credentials not found in native keychain

[WARNING] The credential helper (docker-credential-desktop) has nothing for the server URL: registry.hub.docker.com
[WARNING] Got output: credentials not found in native keychain

[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.4.3:build (default) on project korfballteamapi: 416 Requested Range Not Satisfiable
[ERROR] PATCH 
[ERROR] {"errors":[{"code":"RANGE_INVALID","message":"invalid content range"}]}

I am stuck on this one! I suspect the issue’s root is related to authentication not being filled correctly in the auths section of the config.json file. This, in turn, prevents the successful push of Docker images.

I would appreciate any guidance or solutions you could give me to fix this issue. Please let me know if you need additional details or logs.

Thank you so much for your help.

Best regards,
Richard Smith-Uchotski

You are using Docker Desktop so the credentials are stored securely in a way so it cannot be read by everyone. Without it, using Docker CE, unless you install a credential manager, credentials would be stored in the json only base64 encoded which can be easily decoded and stolen by an application.

You can find other credential managers here, if “desktop” does not work for you

I never tried, but there is a “wincred”.

If it doesn’t help, since I don’t know how JIB works, what it does exactly, you can either try to explain it to us, or you could try to ask about it in a Java forum where JIB users might have used Docker Desktop.