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 in DevOps Tools by Kichu
• 17,220 points
41 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,280 points
177 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 in DevOps Tools by Bhavitha
• 980 points
127 views
0 votes
0 answers
0 votes
0 answers
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
957 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 in Other DevOps Questions by Kichu
• 17,220 points
51 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,133 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 in Azure by Edureka
• 5,660 points
37 views
0 votes
0 answers
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP