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 <hello@davidpelaez.me>
| ... | ... |
@@ -15,8 +15,11 @@ page_keywords: API, Docker, rcli, REST, documentation |
| 15 | 15 |
- Since API version 1.2, the auth configuration is now handled client |
| 16 | 16 |
side, so the client has to send the `authConfig` as a `POST` in `/images/(name)/push`. |
| 17 | 17 |
- authConfig, set as the `X-Registry-Auth` header, is currently a Base64 |
| 18 |
- encoded (JSON) string with credentials: |
|
| 19 |
- `{'username': string, 'password': string, 'email': string, 'serveraddress' : string}`
|
|
| 18 |
+ encoded (JSON) string with the following structure: |
|
| 19 |
+ `{"username": "string", "password": "string", "email": "string",
|
|
| 20 |
+ "serveraddress" : "string", "auth": ""}`. Notice that `auth` is to be left |
|
| 21 |
+ empty, `serveraddress` is a domain/ip without protocol, and that double |
|
| 22 |
+ quotes (instead of single ones) are required. |
|
| 20 | 23 |
|
| 21 | 24 |
The current version of the API is v1.15 |
| 22 | 25 |
|