diff options
author | Jhon Honce <jhonce@redhat.com> | 2020-09-23 08:19:05 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2020-09-29 08:46:44 -0700 |
commit | 5aead1509c681de533b8966e781e15327fe35ab6 (patch) | |
tree | 8ba86faa76299b04e902b3bf11c5b7ce9872192a /pkg/api/handlers/libpod/images.go | |
parent | 2ee415be90b8d6ab75f9fe579fc1b8690e023d3c (diff) | |
download | podman-5aead1509c681de533b8966e781e15327fe35ab6.tar.gz podman-5aead1509c681de533b8966e781e15327fe35ab6.tar.bz2 podman-5aead1509c681de533b8966e781e15327fe35ab6.zip |
Add X-Registry-Config support
* Refactor auth pkg to support X-Registry-Config
* Refactor build endpoint to support X-Registry-Config. Supports:
* --creds
* --authfile
* Added X-Reference-Id Header to http.Request to support log event
correlation
* Log headers from http.Request
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/api/handlers/libpod/images.go')
-rw-r--r-- | pkg/api/handlers/libpod/images.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go index bc1bdc287..3ebf6e4c6 100644 --- a/pkg/api/handlers/libpod/images.go +++ b/pkg/api/handlers/libpod/images.go @@ -438,9 +438,9 @@ func PushImage(w http.ResponseWriter, r *http.Request) { return } - authConf, authfile, err := auth.GetCredentials(r) + authConf, authfile, key, err := auth.GetCredentials(r) if err != nil { - utils.Error(w, "Something went wrong.", http.StatusBadRequest, errors.Wrapf(err, "Failed to parse %q header for %s", auth.XRegistryAuthHeader, r.URL.String())) + utils.Error(w, "Failed to retrieve repository credentials", http.StatusBadRequest, errors.Wrapf(err, "Failed to parse %q header for %s", key, r.URL.String())) return } defer auth.RemoveAuthfile(authfile) |