Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not retrieve credential from local cache for service principal #162

Closed
JontyMC opened this issue Nov 2, 2021 · 12 comments
Closed
Labels
bug Something isn't working

Comments

@JontyMC
Copy link

JontyMC commented Nov 2, 2021

Our github actions stopped working today with the error:

ERROR: Could not retrieve credential from local cache for service principal **********. Run az login for this service principal.

I've tried recreating the service principal, with no luck.

@JontyMC JontyMC added the need-to-triage Requires investigation label Nov 2, 2021
@edwardgronroos
Copy link

We're experienceing the same problem, something broke with the new Azure Cli version released today?

@JontyMC
Copy link
Author

JontyMC commented Nov 2, 2021

We're experienceing the same problem, something broke with the new Azure Cli version released today?

Looks this way, pinning the CLI action to last version works:

- name: Upload to blob storage
        uses: azure/CLI@v1
        with:
          azcliversion: 2.29.2
          inlineScript: ...

@shreekannan
Copy link

We're experiencing the same problem,

ERROR: Could not retrieve credential from local cache for service principal. Run az login for this service principal. Error: Error: az cli script failed.

@borrow-checker
Copy link

Same error. Has resulted in a full stop of our development capabilities. @aksm-ms @BALAGA-GAYATRI

@rawilder
Copy link

rawilder commented Nov 3, 2021

Also experiencing this, fulling halting our dev flows. @aksm-ms

@ryan-theta
Copy link

ryan-theta commented Nov 3, 2021

I've just fixed a recent issue with the required "inlineScript" on linux failing. Changing the clause to "run" fixes the problem for us.

Before fix: (failing)
uses: Azure/cli@1.0.4
with:
inlineScript: az webapp start -g ${{ secrets.RESOURCE_GROUP }} -n ${{ secrets.PORTAL_APP_NAME }} --slot staging
ERROR: Could not retrieve credential from local cache for service principal bla. Run az login for this service principal.
Error: Error: az cli script failed.

After fix:
run: |
az webapp start -g ${{ secrets.RESOURCE_GROUP }} -n ${{ secrets.PORTAL_APP_NAME }} --slot staging
Success, az command works.

@jiasli
Copy link
Member

jiasli commented Nov 3, 2021

Please see the detailed explanation at Azure/azure-cli#20154 (comment)

@BALAGA-GAYATRI
Copy link
Contributor

So the workaround from the above Azure/azure-cli#20154 (comment) should solve this issue. We are working to update the runners with latest CLI to avoid this discrepancy. Till then this fix should work.

@BALAGA-GAYATRI BALAGA-GAYATRI added bug Something isn't working and removed need-to-triage Requires investigation labels Nov 9, 2021
@totogtr
Copy link

totogtr commented Nov 9, 2021

Was there a change in the az installed in the runners today ? The workaround subitly stopped working and I needed to update all my workflows with 2.30.0 which now works...

Could you please advise as it's annoying to have to debug that.

edburns added a commit to azure-javaee/weblogic-azure that referenced this issue Nov 10, 2021
modified:   .github/workflows/testWlsAksWithDependencyCreation.yml

- Use 2.30.0

Signed-off-by: Ed Burns <edburns@microsoft.com>
@edburns
Copy link
Member

edburns commented Nov 10, 2021

Hit this as well with 2.29.0. Trying with 2.30.0 now.

@edburns
Copy link
Member

edburns commented Nov 10, 2021

Seems to have resolved the problem.

@BALAGA-GAYATRI
Copy link
Contributor

Closing this issue as runners are updated with latest CLI :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants