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 read password from stdin? #26

Open
simonsan opened this issue Sep 17, 2023 · 2 comments
Open

How to read password from stdin? #26

simonsan opened this issue Sep 17, 2023 · 2 comments

Comments

@simonsan
Copy link

simonsan commented Sep 17, 2023

I would like to read the password from stdin in CD, how can I achieve that as for example with gpg?

echo "${{ inputs.rsign-passphrase }}" | gpg --pinentry-mode=loopback \
          --passphrase-fd 0 --local-user 131241512131DEF \
          --armor --output $RELEASE_NAME.asc --detach-sign $RELEASE_NAME

Afaics -W is only for no password at all?

@simonsan
Copy link
Author

Ah, I just found: #4

@simonsan
Copy link
Author

simonsan commented Sep 17, 2023

After reading #4:

I would be happy about anything, that let's me give rsign2 a password in e.g. Github Actions environment. For example, it could also read an environment variable, if rpassword doesn't support stdin. Would be a start.

Maybe something like --password-env-var which I can give the environment variable name to read the password from. What's your opinion on that? @jedisct1

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

No branches or pull requests

1 participant