From 56a385e4890bf6fae56b4d7ec804b0b32abfae70 Mon Sep 17 00:00:00 2001 From: David Pelaez Date: Sat, 13 Sep 2014 18:02:02 -0500 Subject: [PATCH] Improved X-Registry-Auth content instructions Hi, this is a small contribution to fix some slightly unprecise information about the `X-Registry-Auth` header required to pull from private registries through the remote API. After a lot of trial and I error I managed to find that the documentation indications had this issues: * Apparently single quotes cannot be used and double quotes (regular JSON) is required. * Also the `auth` key must be passed even if empty or a 403 will result. * It was not clear what the `serveraddress` had to be. I added some small clarifications for anyone taking a look at the docs to keep them from the problems I've encountered. Hope this is helpful. Thanks to all the contributors for bringing so much awesomeness to the linux world. :) Signed-off-by: David Pelaez Tamayo Upstream-commit: 8c2b170c6ef3f8ec40c3a1bd6fdfc37f9271852a Component: engine --- .../engine/docs/sources/reference/api/docker_remote_api.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/engine/docs/sources/reference/api/docker_remote_api.md b/components/engine/docs/sources/reference/api/docker_remote_api.md index 9f200a43b8..6a7e9731be 100644 --- a/components/engine/docs/sources/reference/api/docker_remote_api.md +++ b/components/engine/docs/sources/reference/api/docker_remote_api.md @@ -15,8 +15,11 @@ page_keywords: API, Docker, rcli, REST, documentation - Since API version 1.2, the auth configuration is now handled client side, so the client has to send the `authConfig` as a `POST` in `/images/(name)/push`. - authConfig, set as the `X-Registry-Auth` header, is currently a Base64 - encoded (JSON) string with credentials: - `{'username': string, 'password': string, 'email': string, 'serveraddress' : string}` + encoded (JSON) string with the following structure: + `{"username": "string", "password": "string", "email": "string", + "serveraddress" : "string", "auth": ""}`. Notice that `auth` is to be left + empty, `serveraddress` is a domain/ip without protocol, and that double + quotes (instead of single ones) are required. The current version of the API is v1.15