Skip to content

Instantly share code, notes, and snippets.

@sallyom
Last active April 26, 2024 08:26
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save sallyom/8dae0ae0494101b9162a6b7c5dafcb7e to your computer and use it in GitHub Desktop.
Save sallyom/8dae0ae0494101b9162a6b7c5dafcb7e to your computer and use it in GitHub Desktop.
## OpenShift4 pull-secret:
1. Download your pull-secret from [console.redhat.com](https://console.redhat.com/openshift/install/aws/installer-provisioned)
- click on “Download Pull Secret”. Save it somewhere, e.g. ~/some-dir/pull-secret
2. Add the apps.ci auth to pull-secret! _internal OpenShift developers only_
- Obtain an API token by visiting https://oauth-openshift.apps.ci.l2s4.p1.openshiftapps.com/oauth/token/request
copy the oc login cmd and paste in terminal to login to the ci cluster, then run this:
- `$ oc registry login --to ~/some-dir/pull-secret`
This will append the auth from registry.ci.openshift.org to your cloud.openshift.com pull-secret but it will also
make the pull-secret multi-line.
3. Repeat step 2, except this time, authenticate to the cluster-bot image registry (for cluster-bot image builds, if you
are using cluster-bot to build your release image. API token request here:
https://oauth-openshift.apps.build01.ci.devcluster.openshift.com/oauth/token/request
This will append the auth from cluster-bot registry to the above pull-secret but it will also
make the pull-secret multi-line.
4. Repeat step 3 to authenticate to build05 cluster registry:
https://oauth-openshift.apps.build05.l9oh.p1.openshiftapps.com/oauth/token/display
This will append the auth from cluster-bot registry to the above pull-secret but it will also
make the pull-secret multi-line.
The install-config requires a single-line pull-secret. That can be obtained with step 5.
5. `$ jq -c < ~/some-dir/pull-secret`
- run this jq cmd to get the single-line pull-secret to pass to openshift-installer and/or to create an install-config.yaml
@ArangoGutierrez
Copy link

For handy use I have this built in bash func in my bash_profile
Supossing you have your Pull Secret on a file named pull_secret on a path where you store your personal tokens

get_pull_secret () 
{ 
    echo"";
    cat $PATH_TO_SECRETS/pull_secret | jq -c;
    echo ""
}

@sallyom
Copy link
Author

sallyom commented Jan 4, 2021

For handy use I have this built in bash func in my bash_profile

👍 thank you!

@sallyom
Copy link
Author

sallyom commented Jun 11, 2021

OpenShift4 pull-secret:

  1. Download your pull-secret from console.redhat.com
    • click on “Download Pull Secret”. Save it somewhere, e.g. ~/some-dir/pull-secret
  2. Add the apps.ci auth to pull-secret! internal OpenShift developers only
    • Obtain an API token by visiting https://oauth-openshift.apps.ci.l2s4.p1.openshiftapps.com/oauth/token/request
      copy the oc login cmd and paste in terminal to login to the ci cluster, then run this:
    • $ oc registry login --to ~/some-dir/pull-secret
      This will append the auth from registry.ci.openshift.org to your cloud.openshift.com pull-secret but it will also
      make the pull-secret multi-line.
  3. Repeat step 2, except this time, authenticate to the cluster-bot image registry (for cluster-bot image builds, if you
    are using cluster-bot to build your release image. API token request here:
    https://oauth-openshift.apps.build01.ci.devcluster.openshift.com/oauth/token/request
    This will append the auth from cluster-bot registry to the above pull-secret but it will also
    make the pull-secret multi-line. The install-config requires a single-line pull-secret. That can be obtained with step 5.
  4. Repeat step 3 to authenticate to build05 cluster registry:
    https://oauth-openshift.apps.build05.l9oh.p1.openshiftapps.com/oauth/token/display
    This will append the auth from cluster-bot registry to the above pull-secret but it will also
    make the pull-secret multi-line. The install-config requires a single-line pull-secret. That can be obtained with step 5.
  5. $ jq -c < ~/some-dir/pull-secret
    • run this jq cmd to get the single-line pull-secret to pass to openshift-installer and/or to create an install-config.yaml

@rphillips
Copy link

@sallyom
Copy link
Author

sallyom commented Sep 27, 2022

thanks @rphillips, added in step 4 above

@rphillips
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment