sops icon indicating copy to clipboard operation
sops copied to clipboard

How to Setup SOPS on windows? Please share me doc if any.

Open mkanna opened this issue 6 years ago • 9 comments

Using it on Linux based os, want to try it on windows (local), didn't succeed so far. Please share doc for the same.

mkanna avatar Nov 05 '19 08:11 mkanna

Do you have a more specific question? The answer is "the same way you would on Linux", as far as I can tell. Download the binary and run it.

autrilla avatar Nov 05 '19 19:11 autrilla

There is should be some note in the documentation, that it is a single binary for Windows, not the installer. It should be placed somewhere on the disk and added to the PATH variable.

Moskovych avatar Sep 10 '21 13:09 Moskovych

I cannot find any documentation for windows, only for linux. Can this thing be installed on win 10?

diegocejasprieto avatar Aug 21 '24 13:08 diegocejasprieto

@diegocejasprieto You can configure SOPS tool on Windows manually:

  1. Download latest sops-v3.9.1.exe
  2. Copy the tool to the C:\Program Files (x86)\Sops\v3.9.1 folder and rename to sops.exe
  3. Open "Environment Variables" window and add C:\Program Files (x86)\Sops\v3.9.1 to the PATH variable
  4. Open CMD and try: sops -v

Pavel-Nova avatar Nov 04 '24 10:11 Pavel-Nova

You can also install it through Chocolatey package manager https://community.chocolatey.org/packages/sops

dreking avatar Jan 10 '25 14:01 dreking

I have successfully installed sops with Chocolatey on Windows 11. But sops is failing. I'm specifying my AWS profile with --aws-profile (credentials are stored in my users home C:\Users\username\.aws\credentials) and the sops config file .sops.yaml (having the kms key) is in the projects root. Error message received: Group 0: FAILED arn:aws:kms:::key/: FAILED - | failed to decrypt sops data key with AWS KMS: operation | error KMS: Decrypt, failed to sign request: failed to | retrieve credentials: failed to refresh cached credentials, | no EC2 IMDS role found, operation error ec2imds: | GetMetadata, canceled, context deadline exceeded

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.

Am I missing any configuration step?

positiviv avatar Jan 21 '25 07:01 positiviv

I found this article that can help you https://blog.gitguardian.com/a-comprehensive-guide-to-sops/

dreking avatar Jan 21 '25 08:01 dreking

Well this is a nice article about sops indeed but it doesn't help to fix the issue I face when executing sops on Windows 11.

positiviv avatar Jan 23 '25 13:01 positiviv

I finally got it to work! It does only work if the profile is stored as an environmental variable. To execute sops in Powershell and set the environmental variable for this command only you can execute it with a subshell: powershell -Command { $env:AWS_PROFILE="profilename"; sops secret-file.yaml }

positiviv avatar Jun 11 '25 09:06 positiviv