Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Configure Repository Credentials

Release: CN2 23.1
{}
Change Release
date_range 23-May-23

Use this procedure to configure your repository login credentials in your manifests.

  1. Install docker if you don't already have docker installed.
  2. Log in to the Juniper Networks repository where you pull the container images.
    content_copy zoom_out_map
    docker login enterprise-hub.juniper.net

    Enter your login credentials when prompted.

    Once you've logged in, your credentials are automatically stored in ~/.docker/config.json. (If you installed docker using snap, then the credentials are stored in the ~/snap/docker directory hierarchy.)

  3. Encode your credentials in base64 and store the resulting string.
    content_copy zoom_out_map
    ENCODED_CREDS=$(base64 -w 0 config.json)
    Take a look at the encoded credentials.
    content_copy zoom_out_map
    echo $ENCODED_CREDS
  4. Replace the credentials placeholder in the manifests with the encoded credentials.
    The manifests have a <base64-encoded-credential> credentials placeholder. Simply replace the placeholder with the encoded credentials in all manifests.
    content_copy zoom_out_map
    sed -i s/'<base64-encoded-credential>'/$ENCODED_CREDS/ *.yaml
    Double check by searching for the encoded credentials in the manifests.
    content_copy zoom_out_map
    grep $ENCODED_CREDS *.yaml
    You should see the encoded credentials in the manifests.
footer-navigation