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.

Error: Az CLI Login failed. Please check the credentials and make sure az is installed on the runner.

See original GitHub issue

Hi, I also commented on a closed issue This issue is not fixed for me in @1.4.3 (and not working with @v1 reference either). Error is exactly the same as in the first message.

  1. Credentials are for sure working fine, executed az login --service-principal -u <xx> --tenant <xx> -p <xx> postfixed with az account set --subscription <xx> locally using the same creds which is in my repo secrets, cli login performed successfully
  2. Attaching debug logs of workflow execution here (the main point was to find out az cli version for local comparison) azure-cli-workflow-run.txt

Please advise! Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:40

github_iconTop GitHub Comments

alexanderdavidecommented, Aug 25, 2022

For me, the problem was that I was testing locally with act which doesn’t have the Azure CLI installed as opposed to Ubuntu based GitHub Shared Runners. In such cases, simply install Azure CLI beforehand.

roalexancommented, Mar 28, 2022

FWIW, I hit the same problem and struggled through it, following various bits and pieces of what I read in this bug and this one as well. The root cause for me was that the JSON that you paste into the GitHub “repository secret” MUST have the keys exactly as shown:

{ “clientId”: “AAA”, “clientSecret”: “BBB”, “tenantId”: “CCC”, “subscriptionId”: “DDD” }

not sure if the order matters (probably not), but originally the output of the service principal that I created had a different set of keys - e.g.:

{ “appId”: “AAA”, “name”: “BBB”, “password”: “CCC”, “tenant”: “DDD” }

so, I “transformed” the JSON - removed “name”, added “subscriptionId”, and changed the names of the other three keys - and it is working for me now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

github action azure/login@v1 not working on self hosted git ...
There's now an open issue to install the cli in the login action if it doesn't exist:
Read more >
Connect GitHub and Azure | Microsoft Learn
Open the Az CLI login action and verify that it ran successfully. You should see the message Login successful . If your login...
Read more >
GitHub Automation Error: Az CLI Login failed. Please check ...
Here are steps to fix the issue: Login to Azure portal ( Navigate into Azure Active Directory.
Read more >
GitHub Actions: Authenticate to Azure Without a Secret using ...
In the original version of this post, I extracted the Azure login task to a ... OIDC logic) and you do not have...
Read more >
Challenge 03: Deploy to Azure WebApp using GitHub Actions
The first run of your pipeline should fail with an error message like this: Error: Az CLI Login failed. Please check the credentials....
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 Post

No results found

github_iconTop Related Hashnode Post

No results found