Skip to content

Commit

Permalink
Update pull-image-private-registry.md (#9153)
Browse files Browse the repository at this point in the history
`-d` does not work on mac, `--decode` should work cross platform
  • Loading branch information
Samir Patel authored and k8s-ci-robot committed Jul 17, 2018
1 parent af689cd commit 6fc5f4b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ The value of the `.dockerconfigjson` field is a base64 representation of your Do
To understand what is in the `.dockerconfigjson` field, convert the secret data to a
readable format:

kubectl get secret regcred --output="jsonpath={.data.\.dockerconfigjson}" | base64 -d
kubectl get secret regcred --output="jsonpath={.data.\.dockerconfigjson}" | base64 --decode

The output is similar to this:

{"auths":{"yourprivateregistry.com":{"username":"janedoe","password":"xxxxxxxxxxx","email":"jdoe@example.com","auth":"c3R...zE2"}}}

To understand what is in the `auth` field, convert the base64-encoded data to a readable format:

echo "c3R...zE2" | base64 -d
echo "c3R...zE2" | base64 --decode

The output, username and password concatenated with a `:`, is similar to this:

Expand Down

0 comments on commit 6fc5f4b

Please sign in to comment.