Server message: invalid_token: authorization failed and ValueError: Could not push image


Hello! I would like to ask whether the reason my Docker upload failed is due to a network connection issue or an authentication problem (lack of permission). The error messages shown are: server message: invalid_token: authorization failed and ValueError: Could not push image. I’m unable to tell which of these is the cause. Thank you for your help!

Hi,

I checked your token, and they are valid.

As it already started to push some docker layers, it looks like it is a short network connection issue, or?

If you have continued problems with this, please invite me (my account is mam10eks) to your github repository, I could then upload the image from my machine.

Best regards,

Maik

Okay, I understand. I will switch to a different network connection and try pushing again. In the case of this kind of short connection issue, will the part of the Docker image that I previously pushed be saved, or do I need to start pushing all the files from the beginning? Thank you for your help.

Hi,

Docker usually can cache layers and does not need to re-push layers that are already pushed.
Still, there are cases where this caching does not work well (for instance, when one adds the code before installing the dependencies, then it can not cache the layer with the dependencies, but when one adds the dependencies before the code, it can cache the layer with the dependencies.).

Best regards,

Maik