Docker Community Forums

Share and learn in the Docker community.

Unauthorised on pushing docker-whale

hub
docker
dockerhub

(Banksysan) #1

I have this question on StackOverflow but haven’t got a solution.

I’m working through the Getting Started documents, step 9.

I have a repo at https://hub.docker.com/r/banksysan/docker-whale/ and have a config.json in the form

{
	"auths": {
		"https://index.docker.io/v1/": {
			"auth": "secret_string",
			"email": "BanksySan@googlemail.com"
		}
	}
}

However, when I push the image I get `unauthorised:

$ docker images
REPOSITORY                    TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
docker-whale                  latest              654156f34320        47 hours ago        274.2 MB
banksysan/docker-whale        latest              654156f34320        47 hours ago        274.2 MB
hello-world                   latest              0a6ba66e537a        3 months ago        960 B
kitematic/hello-world-nginx   latest              38502dd72c08        7 months ago        7.913 MB
docker/whalesay               latest              ded5e192a685        8 months ago        247 MB

David@Plod MINGW64 ~
$ docker push banksysan/docker-whale
The push refers to a repository [docker.io/banksysan/docker-whale] (len: 1)
654156f34320: Preparing
unauthorized: access to the requested resource is not authorized

I’m stuck at the first hurdle. Any help sorting this out would be gratefully appreciated.

Thanks

Dave


(Jeff Anderson) #2

Hello,

Try installing docker from the official docker project’s repository instead of using your distro’s packages. There is a script to set up the repo and install docker here: https://get.docker.com/

Cheers!


(Banksysan) #3

Hey Jeff,

Thanks for the quick response. I’m using Windows, I installed it as per the docs, downloading the installer from https://docs.docker.com/windows/step_one/.


(Jeff Anderson) #4

Ah, understood. This sounds familiar. I believe this is related to this github issue: https://github.com/docker/docker/pull/19264


(Banksysan) #5

Thank you, that was the problem and fix.

For anyone else. The fix was as described here.

Your config.json should look like:

{
    "auths": {
        "https://index.docker.io/v1/": {
            "auth": "secret hash",
            "email": "your email"
        },
        "https://registry-win-tp3.docker.io/v1/": {
            "auth": "secret hash",
            "email": "your email"         
        }
    }
}

Note the addition of https://registry-win-tp3.docker.io/v1/