-
Notifications
You must be signed in to change notification settings - Fork 879
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
Is there a way to integrate with Visual Studio Code? #613
Comments
If you are running a *nix OS, then you just need to have your |
Thanks, unfortunately thats pretty clunky as it means I'd have to do that every time I need to open a yaml file (I manage 100s of them). So would have to run a sops command to open each one outside of the UI. I wonder how tricky it is to write an extension for VSCode that would do this automagically |
You could set $EDITOR to Editing will happen in whatever $EDITOR is set to, or, if it's not set, in vim. Keep in mind that sops will wait for the editor to exit, and then try to reencrypt the file. Some GUI editors (atom, sublime) spawn a child process and then exit immediately. They usually have an option to wait for the main editor window to be closed before exiting. See #127 for more information. |
There is an abandoned vscode-sops plugin, but never tried it |
It's not even existing on GitHub anymore so i think we can't expect any updates here soon ;) I'm currently playing with sops in combination with Azure Key Vault. Works as expected. Only problem currently is that somehow behaves in a way that i don't understand. $ sops config.yaml
File has not changed, exiting. I guessed that it's related to auto save function that i have enabled in VS Code but even after i turned it off it's the same behavior. Any idea? (works with vim and nano without any problems) // UPDATE: EDITOR="code --wait" Works like a charm |
Yep, that works. Only nice-to-have that I was getting at with this ticket would be auto decrypt via the GUI, rather than having to manually open each file via the command line. Thats not really a sops issue though |
Also, in #380 (comment) misak113 posted a link to https://marketplace.visualstudio.com/items?itemName=signageos.signageos-vscode-sops |
I can confirm, setting the |
Can Visual Studio Code seamlessly decrypt and re-encrypt when opening/editing sops-protected files?
Or is the only option to decrypt these manually before trying to edit in VS?
The text was updated successfully, but these errors were encountered: