Why am I receiving a warning message when logging into helm to install the Logging agent?
When logging in to the helm registry you receive a message that using a password on the CLI is insecure.
When running a command similar to the following to log in to the helm registry:
helm registry login -u iambearer -p $(ibmcloud iam oauth-tokens --output json | jq -r .iam_token | cut -d " " -f2) icr.io
Windows Windows PowerShell users should use this command instead:
helm registry login -u iambearer -p ((ibmcloud iam oauth-tokens --output json | ConvertFrom-Json).iam_token -replace 'Bearer ', '') icr.io
A message similar to the following is returned:
WARNING: Using --password via the CLI is insecure. Use --password-stdin.
Error: Get "https://icr.io/v2/": unauthorized: {"errors":[{"code":"UNAUTHORIZED","message":"Authorization required. See https://cloud.ibm.com/docs/Registry?topic=Registry-troubleshoot-auth-req","detail":"Authorization required. See https://cloud.ibm.com/docs/Registry?topic=Registry-troubleshoot-auth-req"}]}
Your environment might have a proxy in place that is dropping the headers that include the access token.
Do the following to determine if a proxy is in place and install the Logging agent a different way or resolve your proxy configuration.
-
Run the following command to determine if a proxy is in place and is causing the problem.
curl -v https://icr.io/v2/
-
If the command returns
401
, use the Cloud Shell to deploy the Logging agent using the Logging agent deployment steps.