diff --git a/modules/installation-adding-registry-pull-secret.adoc b/modules/installation-adding-registry-pull-secret.adoc index 58fc8ec9c5..5100b5b43b 100644 --- a/modules/installation-adding-registry-pull-secret.adoc +++ b/modules/installation-adding-registry-pull-secret.adoc @@ -50,6 +50,122 @@ ifndef::openshift-origin[] link:https://cloud.redhat.com/openshift/install/pull-secret[Pull Secret] page on the {cloud-redhat-com} site and save it to a `.json` file. endif::[] +. Generate the base64-encoded user name and password or token for your mirror +registry: ++ +[source,terminal] +---- +$ echo -n ':' | base64 -w0 <1> +BGVtbYk3ZHAtqXs= +---- +<1> For `` and ``, specify the user name and password that +you configured for your registry. + +ifndef::openshift-origin[] +. Make a copy of your pull secret in JSON format: ++ +[source,terminal] +---- +$ cat ./pull-secret.text | jq . > /<1> +---- +<1> Specify the path to the folder to store the pull secret in and a name for +the JSON file that you create. ++ +The contents of the file resemble the following example: ++ +[source,json] +---- +{ + "auths": { + "cloud.openshift.com": { + "auth": "b3BlbnNo...", + "email": "you@example.com" + }, + "quay.io": { + "auth": "b3BlbnNo...", + "email": "you@example.com" + }, + "registry.connect.redhat.com": { + "auth": "NTE3Njg5Nj...", + "email": "you@example.com" + }, + "registry.redhat.io": { + "auth": "NTE3Njg5Nj...", + "email": "you@example.com" + } + } +} +---- +endif::[] + +ifndef::openshift-origin[] +. Edit the new +endif::[] +ifdef::openshift-origin[] +. Create a `.json` +endif::[] +file and add a section that describes your registry to it: ++ +[source,json] +---- +ifndef::openshift-origin[] + "auths": { + "": { <1> + "auth": "", <2> + "email": "you@example.com" + }, +endif::[] +ifdef::openshift-origin[] +{ + "auths": { + "": { + "auth": "", + "email": "you@example.com" + } + } +} +endif::[] +---- +<1> For ``, specify the registry domain name, and optionally the +port, that your mirror registry uses to serve content. For example, +`registry.example.com` or `registry.example.com:5000` +<2> For ``, specify the base64-encoded user name and password for +the mirror registry. ++ +ifndef::openshift-origin[] +The file resembles the following example: ++ +[source,json] +---- +{ + "auths": { + "": { + "auth": "", + "email": "you@example.com" + }, + "cloud.openshift.com": { + "auth": "b3BlbnNo...", + "email": "you@example.com" + }, + "quay.io": { + "auth": "b3BlbnNo...", + "email": "you@example.com" + }, + "registry.connect.redhat.com": { + "auth": "NTE3Njg5Nj...", + "email": "you@example.com" + }, + "registry.redhat.io": { + "auth": "NTE3Njg5Nj...", + "email": "you@example.com" + } + } +} +---- +endif::[] + +//// +This is not currently working as intended. . Log in to your registry by using the following command: + [source,terminal] @@ -58,6 +174,7 @@ $ oc registry login --to ./pull-secret.json --registry " ---- + Provide both the registry details and a valid user name and password for the registry. +//// ifeval::["{context}" == "installing-restricted-networks-preparations"] :!restricted: