Compose: no basic auth credentials, manual pull required

Created on 28 Feb 2016  路  12Comments  路  Source: docker/compose

I tried to start a stack on a swarm, but got this error:

root@sepp-roj:/stacks# docker-compose up -d
Creating myproject_appsrc_1
ERROR: Get https://private.registry/v2/ns/app/manifests/0.8.2-26-g1ce3ada: no basic auth credentials

A manual pull is required (no further passwords entered)

root@sepp-roj:/stacks# docker-compose pull 
Pulling appsrc (private.registry/ns/app:0.8.2-26-g1ce3ada)...
sepp-a1: Pulling private.registry/ns/app:0.8.2-26-g1ce3ada... : downloaded
sepp-m2: Pulling private.registry/ns/app:0.8.2-26-g1ce3ada... : downloaded
sepp-hz-1-122: Pulling private.registry/ns/app:0.8.2-26-g1ce3ada... : downloaded
sepp-p1: Pulling private.registry/ns/app:0.8.2-26-g1ce3ada... : downloaded
Pulling appfpm (phundament/php:5.6-fpm-dev)...
sepp-hz-1-122: Pulling phundament/php:5.6-fpm-dev... : downloaded
sepp-p1: Pulling phundament/php:5.6-fpm-dev... : downloaded
sepp-a1: Pulling phundament/php:5.6-fpm-dev... : downloaded
sepp-m2: Pulling phundament/php:5.6-fpm-dev... : downloaded
Pulling appnginx (schmunk42/nginx:1.9)...
sepp-m2: Pulling schmunk42/nginx:1.9... : downloaded
sepp-hz-1-122: Pulling schmunk42/nginx:1.9... : downloaded
sepp-p1: Pulling schmunk42/nginx:1.9... : downloaded
sepp-a1: Pulling schmunk42/nginx:1.9... : downloaded
Pulling appcli (private.registry/ns/app:0.8.2-26-g1ce3ada)...
sepp-a1: Pulling private.registry/ns/app:0.8.2-26-g1ce3ada... : downloaded
sepp-m2: Pulling private.registry/ns/app:0.8.2-26-g1ce3ada... : downloaded
sepp-hz-1-122: Pulling private.registry/ns/app:0.8.2-26-g1ce3ada... : downloaded
sepp-p1: Pulling private.registry/ns/app:0.8.2-26-g1ce3ada... : downloaded

Version info

root@sepp-roj:/repo/stacks# docker version
Client:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 22:37:33 2016
 OS/Arch:      linux/amd64

Server:
 Version:      swarm/1.1.0
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   a0fd82b
 Built:        Thu Feb  4 08:55:18 UTC 2016
 OS/Arch:      linux/amd64
docker-compose version
docker-compose version 1.6.2, build 4d72027
docker-py version: 1.7.2
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013

Most helpful comment

Ping...

All 12 comments

Same issue with docker 1.10.3 and swarm 1.1.3.
It happens with one image on one host. Other images from the same registry are pulled without any errors on this host and the same image on another host is successfully pulled as well.

Hi, I have the similar error, two images have this problem but others (6) do not have.

Hi, manually docker login & docker pull will solve the problem but waiting for a good solution.

Just to confirm, pulling doesn't work from docker-compose from me as well.

@andkirby I tried with sudo docker login and sudo docker-compose pull and it worked.

@advishnuprasad, thanks for this note!
Yeah, it works in this way but requires extra steps.

And, @advishnuprasad, just used docker-compose pull and it _doesn't_ work for _private_ repository unless I downloaded by using docker pull myimage.

There is a solution to the problem? everything's working when I do docker login and then docker-compose but I want to avoid of doing the docker login phase

Ping...

ping

Please do not add content free pings on issues, either provide additional information (e.g. about your use case, versions you have tested etc) or use emojis on the top post to signal your interest in the issue.

I have just tried this with 1.24.0dev built from commit b2723d6b3d1f5de21047ceb1b04d049306be2076 (current master) and the 1.21.0 release and pulling private images from hub works for me. Since the latest reported version number here is 1.6.2 I'm going to close, I'm sorry that I can't more precisely identify when the issue was fixed.

pulling private images from hub works for me

@ijc Did you try pulling private images from DockerHub or images from a private registry secured with BASIC_AUTH?

Was this page helpful?
0 / 5 - 0 ratings