do you need to login - using az devops login - when AZURE DEVOPS EXT PAT is set

0 votes

I have PAT set using environment variable so do I need again login using az DevOps login in cli to work on Azure DevOps?

I tried the codes in the below three workstations.

  1. Ubuntu running in Azure
  2. Ubuntu running locally in the container on my laptop
  3. WSL (Ubuntu) running locally on my laptop

It keeps on failing in the 3rd one.

Please note: I can retrieve the project list from the first two "workstations" without invoking az DevOps login.

Apr 14, 2022 in Other DevOps Questions by Kichu
• 19,040 points
1,229 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.
0 votes

As you have already set the PAT using the environment variable you don't need to again login using az DevOps login.
To use a PAT, set the AZURE_DEVOPS_EXT_PAT environment variable at the process level.

export AZURE_DEVOPS_EXT_PAT=xxxxxxxxxx

Your bash task is not setting up the environment variable. For that you can add the environment variable declaration to the AzureCLI task and that should work.

env:
AZURE_DEVOPS_EXT_PAT: $(pat_token)

I hope this will help you.

answered Apr 15, 2022 by narikkadan
• 63,600 points

edited Mar 5

Related Questions In Other DevOps Questions

0 votes
1 answer
0 votes
0 answers
0 votes
0 answers
0 votes
0 answers
0 votes
0 answers

How to login to Azure Devops organization using non-microsoft account?

I created an Azure DevOps organization and ...READ MORE

Mar 28, 2022 in Other DevOps Questions by Kichu
• 19,040 points
1,246 views
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
4,379 views
0 votes
2 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