I have a problem pushing a large image to docker hub. I run/receive
docker login -u <username>
Login Succeeded
and when I push a small image to docker hub, everything goes smoothly. However, when I push a larger image (>1GB), this happens:
unauthorized: authentication required
To me it seems that my access token expires during the upload (as mentioned here: docker unauthorized: authentication required - upon push with successful login ) . There was also a hint, to use another terminal to login once more shortly before the push finishes, but this did not work for me.
The computer I use is behind a proxy with limited internet speed (and I cannot change that), so the upload takes roughly 15 minutes.
I tried to setup a dedicated access token in Docker hub, as described here https://docs.docker.com/docker-hub/access-tokens/ , but it seems that it is not possible to change the duration, how long this access token remains active.
My question is now, how do I increase the time that an access token is valid to allow also pushes that require 10+ minutes? I am using Docker version 19.03.6 on a Linux system.
Or could there be another reason the upload of a large image fails and I am looking into the wrong direction?
As described here (https://docs.docker.com/registry/spec/auth/token/) the Docker token has some expires_in field, but I do not know how to set it in the docker login-command or in the config.
Also, in some unrelated case there was a bug described that changes the default expires_in value from 3600s to 600s, here is the source: https://www.jfrog.com/jira/browse/RTFACT-26227 ). Not sure, if the same problem happens in my case as well.