The GNU Privacy Guard [ A Quick Reference Guide ]
![The GNU Privacy Guard [ A Quick Reference Guide ]](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fstock%2Funsplash%2FNel8STCcWy8%2Fupload%2Ff6c5c18291e0b9f66f53f547ae24d1a8.jpeg&w=3840&q=75)
Search for a command to run...
![The GNU Privacy Guard [ A Quick Reference Guide ]](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fstock%2Funsplash%2FNel8STCcWy8%2Fupload%2Ff6c5c18291e0b9f66f53f547ae24d1a8.jpeg&w=3840&q=75)
No comments yet. Be the first to comment.
If you are a homelab owner with a remote cluster of servers running on Proxmox VE, you might have already used the Software-Defined Networking (SDN) capabilities of Proxmox VE. Isolating workloads is

I've recently completed a thorough testing of Langfuse (v3.95.2 OSS), and I wanted to share my observations on its capabilities and overall suitability for AI model observability. My overall impression is that Langfuse is a robust and beneficial tool...

It was a tough spot. One of our valued clients, who I've worked with for a while, recently had a major headache: a key virtual machine (VM) on their office server lost important data. Everything was gone – all the VM configuration files and critical ...

The AI world is buzzing about Deepseek, a powerful language model making waves for its performance and open availability. It's generating a lot of hype right now because it offers a compelling alternative to closed-source models, allowing developers ...

Since Ubuntu 16.04, unattended upgrades have been a standard feature. I think, at first glance, the idea of automatic security updates sounds fantastic. It's like having a little helper constantly patching those pesky vulnerabilities while you sleep ...

GNUPG is a powerful tool that provides cryptographic privacy and authentication for your data communication. It allows you to sign, encrypt, and decrypt programs, disks, and even emails.
Generate a key pair: Use gpg --full-generate-key to create a unique pair of keys for encryption and signing.
List key pairs: View all your available keys with gpg --list-keys --keyid-format=long.
Display your public key: Share your public key with others using gpg -a --export <Your Key ID>. Never share your private key!
Add a subkey: Subkeys enhance security. Use gpg --edit-key [Your Key ID] followed by addkey and save to add one.
Display subkeys: After listing keys with gpg --list-keys, edit a key using gpg --edit-key <Your Key ID>. Copy the subkey ID and use gpg -a --export <KEY ID> to display it.
Send your public key to a public server: Public keys are meant to be shared. Use gpg --send-keys <Your KEY ID> to upload it.
Generate a revocation certificate: If your key is compromised, create a revocation certificate with gpg --output revoke.asc --gen-revoke <Your Key ID>. Import it and upload it again to revoke the key.
Search for a public key: Find a key using its ID with gpg --search-keys <KEY ID>.
Import a public key: Once found, import the key with gpg --recv-keys <Key ID>.
Beware of key impersonation: Anyone can create a key with your email address. To verify a key's authenticity, compare fingerprints.
Verify fingerprints: Use gpg --fingerprint <Person's KEY ID> to see a key's fingerprint. Contact the person and confirm it matches.
The web of trust allows you to trust others based on established trust relationships.
Trust a key: Use gpg --edit-key <Person's Key ID>, then trust and save to trust someone's key.
Sign a key: Signing a key verifies its ownership. Edit the key with gpg --ask-cert-level --edit-key <Person's Key ID>. Look for "Full" trust on the left side of the user ID. Use check to see who signed the key and sign to add your signature. Upload the signed key again to the public server.
Revoke your signature: If a signed key becomes invalid, use gpg --edit-key <Person's Key ID>, then revsig and save to revoke your signature. Upload the updated key information.
Encryption uses the receiver's public key to scramble the message. Only their private key can decrypt it. Share your public key beforehand for them to receive encrypted messages.
Signing uses your private key to create a digital signature that verifies the message's origin and integrity. The receiver uses your public key to confirm the signature.
Signed commits: Add your GPG public key to your GitHub account.
Go to: https://github.com/settings/keys
Scroll to the bottom. You'll find Add GPG Key button in the GPG keys section.
Export your public key using this command:
gpg --export --armor <KEY ID>
Replace <KEY ID> with your actual KEY ID which you can find by listing your keys using this command: gpg --list-keys.
If you have not created a gpg key yet, check this out: Generating and Managing Keys
Copy the exported public key content and paste it in the Github and save.
Note: The email associated to your key should match the primary email in your github and email in your local git.
Sign a single commit: Use git commit -S <Your Key ID> -m "message" to create signed commits.
Global configuration: Set global Git settings with:
git config --global user.signingkey "<Your KEY ID>"
git config --global commit.gpgsign true
git config --global tag.gpgsign true
Commit email: Ensure the primary email in your key matches your Git commit email. Set it with:
git config --global user.email "<Email associated to your Key>"Verify signed commits: Use git log --show-signature to see which commits are signed.
GPG keys can encrypt emails. Upload your private key to a trusted email client like Thunderbird. You can then choose to digitally sign or encrypt emails based on the recipient's public key availability.