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

'az' is not recognized as an internal or external command #1430

Open
papanito opened this issue Feb 5, 2024 · 2 comments
Open

'az' is not recognized as an internal or external command #1430

papanito opened this issue Feb 5, 2024 · 2 comments

Comments

@papanito
Copy link

papanito commented Feb 5, 2024

I am using sops with Terraform and have the same issue as in #818

│ Error: Failed to get the data key required to decrypt the SOPS file.
│
│ Group 0: FAILED
│   https://xxxxxxxx.vault.azure.net/keys/sops-key/xxxxxxxxxxxx: FAILED
│     - | Invoking Azure CLI failed with the following error: 'az' is
│       | not recognized as an internal or external command,
│       | operable program or batch file.
│
│
│ Recovery failed because no master key was able to decrypt the file. In
│ order for SOPS to recover the file, at least one key has to be successful,
│ but none were.

Calling az works fine and

hich az
/c/Program Files/Microsoft SDKs/Azure/CLI2/wbin/az

The difference to [#818] is, that az is installed with msi not SOPS

@mortenn
Copy link

mortenn commented Feb 5, 2025

Still an issue when using sops via git bash installed using winget:

$ sops.exe prod.secrets.json
[AZKV]   time="2025-02-05T15:01:38+01:00" level=error msg="Failed to create Azure authorizer" error="Invoking Azure CLI failed with the following error: 'az' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
Failed to get the data key required to decrypt the SOPS file.
...
$ az

     /\
    /  \    _____   _ _  ___ _
   / /\ \  |_  / | | | \'__/ _\
  / ____ \  / /| |_| | | |  __/
 /_/    \_\/___|\__,_|_|  \___|


Welcome to the cool new Azure CLI!

@mortenn
Copy link

mortenn commented Feb 5, 2025

Downloading and putting sops in my ~/bin folder that is already in my path, however, it works fine - so the problem lies with the winget distribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants