Why jib dockerBuild plugin fails to connect

I was trying to build the docker image for a project I’m working onto.
It’s based on jhipster, after configuring the project it tells me to run the following maven command:

./mvnw -ntp -Pprod verify jib:dockerBuild

Unfortunately it doesn’t seem to work, it returns me this errors:

[WARNING] The credential helper (docker-credential-pass) has nothing for server URL: registry.hub.docker.com
...
[WARNING] The credential helper (docker-credential-pass) has nothing for server URL: index.docker.io
[WARNING] 

And finally fails with:

[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.4.0:dockerBuild (default-cli) on project booking: (null exception message): NullPointerException -> [Help 1]

Recently I worked on a google cloud project, and I edited the ~/.docker/config.json configuration file. I had to remove google’s configuration entries to sort out another problem. Could that be the origin of the problem I’m facing now?

I’ve tried to do docker logout and docker login without success.

Source: Docker Questions