sops
sops copied to clipboard
Error unmarshalling input json: invalid character 'ÿ' looking for beginning of value age Windows
After i try to run sops with binary windows with following
command
sops\sops-v3.7.3.exe --decrypt --age agekey path/file.json i am getting
Error unmarshalling input json: invalid character 'ÿ' looking for beginning of value age
Testing in Mac and this is working but for windows binary is not .
Hi! I had the same problem with PowerShell. I just switched to CMD (Command prompt) and everything is fine now.
This is caused by File Encoding a BOM add the start of the file.
This might happens if you use the ">" to redirect stdout to a file in powershell.
To solve this I used "| Out-File -Encoding ascii -FilePath
sops do have an --output option as well, but I didn't get it to work. Maybe you can give it atry as well.
@hurzelpurzel
sops do have an --output option as well, but I didn't get it to work. Maybe you can give it atry as well.
Please note that sops's command line parser requires all parameters to come before positional arguments. So sops\sops-v3.7.3.exe --decrypt --age agekey path/file.json --output path/file.out won't work (it will think that --output and path/file.out are two more positional arguments), but sops\sops-v3.7.3.exe --decrypt --age agekey --output path/file.out path/file.json will work.
Maybe that's the problem you're experiencing? The latest SOPS version warns about this situation BTW.