helm registry login --password-stdin in Azure DevOps pipeline

0 votes

I am trying to log in to my private ACR using the azure DevOps pipeline. I tried to do it this way:

- task: AzureCLI@2
  inputs:
    azureSubscription: $(azureSubscriptionForACR)
    scriptType: 'ps'
    scriptLocation: 'inlineScript'
    inlineScript: |
      $password = az acr credential show -n $(azureAcrName) --query passwords[0].value
      helm registry login $(azureContainerRegistry) --username $(azureAcrUserName) --password $password

which works, but there is a warning when I run the pipeline:

"WARNING: Using --password via the CLI is insecure. Use --password-stdin."

I would like to avoid the warning, so I tried many variants of this, but didn't  get the result as expected

- task: AzureCLI@2
  inputs:
    azureSubscription: $(azureSubscriptionForACR)
    scriptType: 'ps'
    scriptLocation: 'inlineScript'
    inlineScript: |
      $password = az acr credential show -n $(azureAcrName) --query passwords[0].value
      echo $password | helm registry login $(azureContainerRegistry) --username $(azureAcrName) --password-stdin

It always ends up with:

Error: Get "https://azureacr.azurecr.io/v2/": unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.

I am using the new helm 3.8.0 is there a way to do it with --password-stdin?

Mar 22, 2022 in DevOps Tools by Kichu
• 19,050 points
964 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In DevOps Tools

0 votes
1 answer

using custom tools in a Bluemix DevOps pipeline stage

When you create a new job, you ...READ MORE

answered Jul 25, 2018 in DevOps Tools by ajs3033
• 7,300 points
777 views
0 votes
1 answer

How to use Azure DevOps server (TFS) Predefined Variable in My Ansible Playbook?

Simply add your variables to the azure-pipelines ...READ MORE

answered Feb 9, 2022 in DevOps Tools by Bhavitha
• 1,000 points
1,534 views
0 votes
0 answers

OWASP Zed Attack Proxy Scan in DevOps pipeline

I want to do the "Authenticated Scan" ...READ MORE

Mar 15, 2022 in DevOps Tools by Kichu
• 19,050 points
828 views
0 votes
0 answers

Multiple YAML build pipelines in Azure DevOps

Using the new YAML way I want ...READ MORE

Mar 15, 2022 in DevOps Tools by Kichu
• 19,050 points
1,113 views
0 votes
2 answers
0 votes
1 answer

login popup not working in tomcat9 when I click the server status

Try and install tomcat 8.0.41. It is ...READ MORE

answered Jul 12, 2018 in DevOps Tools by DareDev
• 6,890 points
1,588 views
0 votes
0 answers

helm registry login --password-stdin in Azure DevOps pipeline

- task: AzureCLI@2   inputs:     azureSubscription: $(azureSubscriptionForACR)     scriptType: 'ps'   ...READ MORE

Mar 23, 2022 in Other DevOps Questions by Kichu
• 19,050 points
960 views
0 votes
1 answer

Fetch AzureVm name from private IP in powershell

If by a better way you mean ...READ MORE

answered Jul 17, 2018 in DevOps on Cloud by DareDev
• 6,890 points
1,873 views
0 votes
1 answer

How do I use Powershell to create an Azure Web App that runs on Linux?

Try the command below: New-AzureRmResource -ResourceGroupName <ResourceGroupName> -Location ...READ MORE

answered Mar 25, 2022 in Azure by Edureka
• 12,690 points
1,023 views
0 votes
0 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP