-
Notifications
You must be signed in to change notification settings - Fork 919
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
How to run gui editor? #127
Comments
sops will wait for the editor to exit. It looks like atom spawns a child process and then exits the main process. This will not work with sops. Atom has a #!/bin/bash
atom -w And set EDITOR to that. |
How about adding this information to the README ? |
Could you add a note for this to the readme? On Oct 20, 2016 3:28 PM, "Adrian Utrilla" [email protected] wrote:
|
On slightly more modern versions of atom, the same can be achieved without creating any scripts, but rather just by exporting editor as follows: |
And for folks flexing Jetbrains IDEs, you can use the
Drop that into a new batch file (e.g. So in my case, the final value of
However, after doing all this, it works like a charm in PhpStorm. 🎉 |
Hey, This issue was linked from Stackoverflow: https://stackoverflow.com/a/52451086. I just wanted to mention that this is terrible advice with VS Code if you are using co-pilot or 3rd party VS Code extensions. Let's say that I would open sops file like this:
I was using it myself and I noticed that VS Code will send the contents of the file to remote servers to get auto completes with co-pilot: I'm not sure if co-pilot will use these as training data or not but it's probably anyway not a good idea to do this. I'm also not good with vim and want to use VS Code for secrets and this is what I do myself:
it seems to me that There's also an option to add something like this into your VS CODE {
// We will use these custom file associations to disable co-pilot
// See more in: https://stackoverflow.com/a/77908836/1337062
"files.associations": {
// If repo would contain secrets in .env file it's better to ignore it
".env*": "plaintext",
// SOPS creates unencrypted temporary files here on MacOS
"/var/folders/*/**": "plaintext",
},
// This setting can't be altered here and
// needs to be copied directly into user settings
"github.copilot.enable": {
"*": true,
"plaintext": false,
},
} I recommend doing both of these if your plaintext unencryted secrets are important to you. Here's a sample commit how I'm handling this same topic in my own product: midworkhq/midwork@ad4124f |
It appears that I can't use gui-based editors such as Atom or Sublime with sops.
My
.bash_profile
containsexport EDITOR=/usr/local/bin/atom
When I try to edit any sops-encrypted file I get something like:
A few sec later Atom opens up with that tmpq6K2_D.yaml file.
It is my understanding that this happens because gui editors open in a separate process outside of my terminal.
Regular terminal editors such vi/nano/mcedit work as expected.
How can I use gui editors with sops?
The text was updated successfully, but these errors were encountered: