Minishift: Failed to login to docker internal image registry

I have been using the mini-shift for local testing.

I was trying to push the docker images to the image registry of Minishift.

Failed Info:

failed to login to the registry.

Source: StackOverflow