Error: Az CLI Login failed. Please check the credentials and make sure az is installed on the runner.
See original GitHub issueHi, I also commented on a closed issue https://github.com/Azure/login/issues/203. 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.
- Credentials are for sure working fine, executed
az login --service-principal -u <xx> --tenant <xx> -p <xx>
postfixed withaz account set --subscription <xx>
locally using the same creds which is in my repo secrets, cli login performed successfully - 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:
- Created 2 years ago
- Comments:40
Top 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: https://github.com/Azure/login/issues/154.
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 (https://portal.azure.com/) 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.