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

better ways gpg import (paste public key not working) #179

Closed
tolgaulas opened this issue May 10, 2021 · 1 comment · Fixed by #183
Closed

better ways gpg import (paste public key not working) #179

tolgaulas opened this issue May 10, 2021 · 1 comment · Fixed by #183

Comments

@tolgaulas
Copy link

I had trouble in importing the admin public key per the documentation, briefly pasting it into the terminal when requesting does not advance the script. So I took another approach:

  • Created the "adminkey.txt" and pasted the admin gpg public key into it.
  • Modified the /opt/bastion/bin/admin/setup-gpg.sh so that it accepts a second argument, the name of the file having the key.
  • Modified the lines
    $gpgcmd --import "$1"
    
    and
    do_import "$2"; exit $?
    

so that the gpg --import is processed.

And only then the script worked.

@speed47
Copy link
Collaborator

speed47 commented May 19, 2021

You need to type ^D (CTRL+D) when done pasting, to that gpg knows you've done entering the key. This is also how it works for the bare gpg --import, but you're right, if you don't know this, it might not be easy to guess. Adding a comment to clarify that in the script.

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

Successfully merging a pull request may close this issue.

2 participants