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

Setup PGP #7

Open
4 tasks
jackboberg opened this issue Apr 21, 2021 · 3 comments
Open
4 tasks

Setup PGP #7

jackboberg opened this issue Apr 21, 2021 · 3 comments
Labels
install Issues and warnings when executing `script/install` on a new setup

Comments

@jackboberg
Copy link
Owner

On a new install, I want to retain my PGP setup.

  • maintain a private export of my keys
  • import keys during setup
  • test keys and report errors during setup
  • maybe: automate exporting
@jackboberg jackboberg added the install Issues and warnings when executing `script/install` on a new setup label Apr 21, 2021
@jackboberg
Copy link
Owner Author

jackboberg commented Apr 21, 2021

I have a local function that seems to provide most of this, using 1Password to store exports from gpg:

setup_pgp () {
    msg_info "==> Setting up pgp keys…"

    # Authenticate with my.1password.com:
    eval $(op signin my)

    op get document XXXXXX | gpg --import
    op get document XXXXXX | gpg --allow-secret-key-import --import
    op get document XXXXXX | gpg --import-ownertrust

    msg "==> Testing pgp setup…"
    # may need to restart agent here
    # `echo RELOADAGENT | gpg-connect-agent`
    echo "test" | gpg --clearsign
}

I'm not sure yet how I feel about committing the 1Password object IDs... 🤔

Additionally reviewing if I want to add ~/.gnupg/gpg.conf to rcm here, or as a part of my 'secure' files managed in iCloud Drive.

auto-key-retrieve
no-emit-version
default-key XXXXXXXXXX

@jackboberg
Copy link
Owner Author

This is the process I used to create the files referenced from 1Password:

gpg -a --export >mypubkeys.asc
gpg -a --export-secret-keys >myprivatekeys.asc
gpg --export-ownertrust >otrust.txt

@enewbury
Copy link

You could also list objects with

op list documents

then filter the json array by the overview.title field, grabbing the uuid field so then you can op get document <uuid>
Granted once you get into parsing/filtering arrays, it might make sense to put this in a little ruby script or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install Issues and warnings when executing `script/install` on a new setup
Projects
None yet
Development

No branches or pull requests

2 participants