question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az pipelines ignores default organization when running commands from a local ADO git folder

See original GitHub issue

Describe the bug When running az cli devops commands from an ADO git folder the az cli devops defaults are ignored.

To Reproduce Azure Cli Version: 2.0.73

Azure-Devops extension version: 0.13.0

Steps to reproduce the behaviour:

  1. Clone an ADO Repo (it’s important that’s an ADO repo, with other GIT providers the bug doesn’t happen)
  2. Navigate to the cloned folder (important, you have to be in the cloned folder)
  3. Login with az devops login and provide a token (my token has all the scopes)
  4. Set defaults, like : az devops configure --defaults organization=https://dev.azure.com/contoso project=ContosoWebApp
  5. Run a command without providing the --organization switch: az pipelines pool list

ERROR:

The requested resource requires user authentication: https://*****@dev.azure.com/*****/azure platform team/_git/azure platform team/vsts/info

Note: the ***** is just to keep my stuff private.

Expected behavior The normal run of the command

Additional context

  • Running the command outside the Git Folder works perfectly.
  • Running the command inside the cloned Git folder of another provider (like GitHub etc…) works perfectly
  • To make it work inside the Git Folder I have to explicitly provide the --organization switch

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mydiemhocommented, Jan 15, 2020

@geverghe could you also add the note to the Getting Started Guide. This was where I first learned about setting default config

1reaction
olandesecommented, Nov 23, 2019

Great work! thank you for listening 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run Git commands in a script - Azure Pipelines - Microsoft Learn
Within Project Settings, select Repositories. Select the repository you want to run Git commands on. Select Security to edit your repository ...
Read more >
How To Run Self-Hosted Azure DevOps Build/Release Agents
Step 1. Navigate to the Organization Settings and select Agent pools from the Pipeline section. pipelines. Step 2. Select the Default agent pool ......
Read more >
Terraform on Azure Pipelines Best Practices - Julie Ng
Here are 5 Best Practices to get you started on the right foot. As an engineer in the Azure Customer Experience (CXP) organization,...
Read more >
Automating infrastructure deployments in the Cloud with ...
Select Azure service connection from the drop-down. This task will run the terraform apply command to deploy the resources. By default, it will ......
Read more >
git-svn Documentation - Git
Once tracking a Subversion repository (with any of the above methods), the Git repository can be updated from Subversion by the fetch command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found