Skip to content
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 pass the passphrase for encryption? #20

Open
bumi opened this issue Dec 14, 2016 · 2 comments
Open

How to pass the passphrase for encryption? #20

bumi opened this issue Dec 14, 2016 · 2 comments

Comments

@bumi
Copy link
Contributor

bumi commented Dec 14, 2016

I have some keys that require a passphrase to be set.
What is the correct way to pass the passphrase for encryption? I saw some solutions to pipe it to and the passphrase-fd to STDIN or setting the passphrase globally for the gpg-agent.

piping the passphrase seems to not work as we already pipe in the data to encrypt and also have the gpg command hard coded.


I am opening this issue as I would add the information to the readme or some documentation - assuming more people have the same questions.

@bumi bumi changed the title How to pass the passphrase for encryption How to pass the passphrase for encryption? Dec 14, 2016
@freewil
Copy link
Collaborator

freewil commented Dec 14, 2016

It's been a while since I've actively done this, but yeah in the past I've used the --passphrase-fd option.

The link above shows using passphrase via 0 (stdin). You probably want to use a file descriptor > 2, here is an example that should get you going in the right direction.

@freewil freewil closed this as completed Feb 24, 2017
@freewil
Copy link
Collaborator

freewil commented Feb 24, 2017

Re-open to add to README/docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants