mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(gnupg): just get the ascii value of keys with no headers nor footers
This commit is contained in:
@@ -154,6 +154,13 @@ gpg --export-ssh-key 'ed25519_key' > ~'/.ssh/id_ed25519.pub'
|
||||
|
||||
# Integrate with Pinentry.
|
||||
export GPG_TTY="$(tty)"
|
||||
|
||||
|
||||
# Only get the base64 armored string in the key
|
||||
# -e '/^-----/d' removes the header and footer
|
||||
# -e '/^=/d' removes the base64 checksum at the bottom
|
||||
# -e '/^$/d' removes empty lines
|
||||
gpg --armor --export 'someone@example.org' | sed -e '/^-----/d' -e '/^=/d' -e '/^$/d'
|
||||
```
|
||||
|
||||
## Encryption
|
||||
@@ -518,9 +525,7 @@ gpg-connect-agent reloadagent '/bye'
|
||||
- [OpenPGP best practices]
|
||||
- [GNU/Linux crypto series]
|
||||
|
||||
## Sources
|
||||
|
||||
All the references in the [further readings] section, plus the following:
|
||||
### Sources
|
||||
|
||||
- [Decrypt multiple openpgp files in a directory]
|
||||
- [ask redhat]
|
||||
@@ -536,7 +541,8 @@ All the references in the [further readings] section, plus the following:
|
||||
- [Stick with security: YubiKey, SSH, GnuPG, macOS]
|
||||
|
||||
<!--
|
||||
References
|
||||
Reference
|
||||
═╬═Time══
|
||||
-->
|
||||
|
||||
<!-- Upstream -->
|
||||
@@ -544,9 +550,6 @@ All the references in the [further readings] section, plus the following:
|
||||
[modify .gnupg home directories]: https://www.gnupg.org/documentation/manuals/gnupg/gpgconf.html
|
||||
[unattended key generation]: https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html
|
||||
|
||||
<!-- In-article sections -->
|
||||
[further readings]: #further-readings
|
||||
|
||||
<!-- Others -->
|
||||
[archlinux's gnupg wiki page]: https://wiki.archlinux.org/title/GnuPG
|
||||
[ask redhat]: https://access.redhat.com/solutions/2115511
|
||||
|
||||
@@ -34,3 +34,9 @@ gpgconf --launch gpg-agent
|
||||
find . -type f -not -name '*.gpg' \
|
||||
-path '*/values.*.y*ml' -path '*/secrets/*.*' \
|
||||
-exec gpg --batch --encrypt-files --yes -r "0123...CDEF" "{}" ';'
|
||||
|
||||
# Only get the base64 armored string in the key
|
||||
# -e '/^-----/d' removes the header and footer
|
||||
# -e '/^=/d' removes the base64 checksum at the bottom
|
||||
# -e '/^$/d' removes empty lines
|
||||
gpg --armor --export 'someone@example.org' | sed -e '/^-----/d' -e '/^=/d' -e '/^$/d'
|
||||
|
||||
Reference in New Issue
Block a user