Live data from Hacker News

Shell-secrets – GPG-encrypted environment variables

github.com

1–10 of 43 posts

Re: Shell-secrets – GPG-encrypted environment variables

#2
The more general version of this is probably sops[1].

(A general problem with these kinds of “wrap GPG” tools is that you end up with “mystery meat” encryption/signatures: your tool’s security margin is at the mercy of GPG’s opaque and historically not very good defaults.)

[1]: https://github.com/getsops/sops

Re: Shell-secrets – GPG-encrypted environment variables

#6

Couldn't you just use pass and have something like this in your bash script/env: export SOME_SECRET="$(pass show some/secret)"

this in a credentials file to source before doing some operation? sure. I usually do: ` ( . ./credentials && ./the_thing ) ` so the secrets are only in the subshell and don't linger in my shell session forever.

but don't put that in rc , as it a) will be visible for all other (child) processes of your shell b) will spawn pinentry everytime the agent's cache ttl expires

Re: Shell-secrets – GPG-encrypted environment variables

#8
post #7

Coincidentally I’ve written something similar to this too. My main takeaway was that GPG isn’t nearly as user friendly as it needs to be.

Highly true. Yet. If you complain or even offer patches (which will, always, without fail, be rejected).

You'll get told off by the GPG devs with something along the lines of "encryption is supposed to be hard".

Re: Shell-secrets – GPG-encrypted environment variables

#9
post #8
post #7

Coincidentally I’ve written something similar to this too. My main takeaway was that GPG isn’t nearly as user friendly as it needs to be.

Highly true. Yet. If you complain or even offer patches (which will, always, without fail, be rejected). You'll get told off by the GPG devs with something along the lines of "encryption is supposed to be hard".

How hard would it be to devise an easy to use wrapper on top of GPG, kind of porcelain-like?

Re: Shell-secrets – GPG-encrypted environment variables

#10
post #9
post #8

Earlier quoted context omitted.

Highly true. Yet. If you complain or even offer patches (which will, always, without fail, be rejected). You'll get told off by the GPG devs with something along the lines of "encryption is supposed to be hard".

How hard would it be to devise an easy to use wrapper on top of GPG, kind of porcelain-like?

You may be interested in https://sequoia-pgp.org/

It isn't exactly a wrapper, but it has an easier to use interface (as well as a more gpg compatible interface).

Post reply on HN