This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.2.2. Configuring credentials that allow images to be mirrored
Create a container image registry credentials file that allows mirroring images from Red Hat to your mirror.
Prerequisites
- You configured a mirror registry to use in your restricted network.
Procedure
Complete the following steps on the installation host:
-
Download your
registry.redhat.io
pull secret from the Pull Secret page on the Red Hat OpenShift Cluster Manager site and save it to a.json
file. Generate the base64-encoded user name and password or token for your mirror registry:
echo -n '<user_name>:<password>' | base64 -w0
$ echo -n '<user_name>:<password>' | base64 -w0
1 BGVtbYk3ZHAtqXs=
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- For
<user_name>
and<password>
, specify the user name and password that you configured for your registry.
Make a copy of your pull secret in JSON format:
cat ./pull-secret.text | jq . > <path>/<pull-secret-file>
$ cat ./pull-secret.text | jq . > <path>/<pull-secret-file>
1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the new file and add a section that describes your registry to it:
"auths": { "<mirror_registry>": { "auth": "<credentials>", "email": "you@example.com" },
"auths": { "<mirror_registry>": {
1 "auth": "<credentials>",
2 "email": "you@example.com" },
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The file resembles the following example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow