Fixed public pull + Added some verbosity about what is happening

Upstream-commit: 00266df8ac64bb3b7e19818ad2dfb852dc0d2e7f
Component: engine
This commit is contained in:
Sam Alba
2013-05-03 15:37:28 -07:00
committed by shin-
parent 9633853dc1
commit 54b287c403

View File

@ -269,7 +269,7 @@ func (graph *Graph) PullRepository(stdout io.Writer, remote, askedTag string, re
if err != nil {
return err
}
if authConfig != nil {
if authConfig != nil && len(authConfig.Username) > 0 {
req.SetBasicAuth(authConfig.Username, authConfig.Password)
}
req.Header.Set("X-Docker-Token", "true")
@ -309,6 +309,7 @@ func (graph *Graph) PullRepository(stdout io.Writer, remote, askedTag string, re
}
for askedTag, imgId := range tagsList {
fmt.Fprintf(stdout, "Resolving tag \"%s:%s\" from %s\n", remote, askedTag, endpoints)
success := false
for _, registry := range endpoints {
if imgId == "" {