Skip to content

Basic authentication not working #241

@dlip

Description

@dlip

I have a private registry with basic authentication, but for some reason the following code doesn't work:

import docker
client = docker.Client()
print client.login("myuser", password="mypassword", email="test@test.com", registry="docker.mytrax.co.jp")
print client.pull("docker.mytrax.co.jp/mytraxwp-app", tag="latest")
{u'Status': u'Login Succeeded'}
{"status":"Pulling repository docker.mytrax.co.jp/mytraxwp-app"}
{"errorDetail":{"message":"Authentication is required."},"error":"Authentication is required."}

My Nginx log says:

 - - [13/Jun/2014:07:09:05 +0000] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http"
 - - [13/Jun/2014:07:09:05 +0000] "POST /v1/users/ HTTP/1.1" 401 194 "-" "Go 1.1 package http"
 - myuser [13/Jun/2014:07:09:05 +0000] "GET /v1/users/ HTTP/1.1" 200 4 "-" "docker/0.11.1 go/go1.2.1 kernel/2.6.32-431.el6.x86_64 os/linux arch/amd64"
 - - [13/Jun/2014:07:09:05 +0000] "GET /v1/_ping HTTP/1.1" 200 4 "-" "python-requests/2.2.1 CPython/2.6.6 Linux/2.6.32-431.el6.x86_64"
 - - [13/Jun/2014:07:09:05 +0000] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http"
 - - [13/Jun/2014:07:09:05 +0000] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http"
 - - [13/Jun/2014:07:09:05 +0000] "GET /v1/repositories/mytraxwp-app/images HTTP/1.1" 401 194 "-" "docker/0.11.1 go/go1.2.1 kernel/2.6.32-431.el6.x86_64 os/linux arch/amd64"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions