1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00

BZ1866588 - modifying registry login method

This commit is contained in:
Kathryn Alexander
2020-09-28 16:16:41 -04:00
committed by openshift-cherrypick-robot
parent 9866aab85d
commit d0f2b1bee3

View File

@@ -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 '<user_name>:<password>' | base64 -w0 <1>
BGVtbYk3ZHAtqXs=
----
<1> For `<user_name>` and `<password>`, 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 . > <path>/<pull-secret-file><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": {
"<mirror_registry>": { <1>
"auth": "<credentials>", <2>
"email": "you@example.com"
},
endif::[]
ifdef::openshift-origin[]
{
"auths": {
"<mirror_registry>": {
"auth": "<credentials>",
"email": "you@example.com"
}
}
}
endif::[]
----
<1> For `<mirror_registry>`, 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 `<credentials>`, specify the base64-encoded user name and password for
the mirror registry.
+
ifndef::openshift-origin[]
The file resembles the following example:
+
[source,json]
----
{
"auths": {
"<mirror_registry>": {
"auth": "<credentials>",
"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 "<registry_host_and_port>
----
+
Provide both the registry details and a valid user name and password for the registry.
////
ifeval::["{context}" == "installing-restricted-networks-preparations"]
:!restricted: