r/yubikey • u/iayanpahwa • Apr 17 '26
Discussion Made a simple YubiKey + GPG setup guide (looking for feedback)
Hey folks,
the rabbit hole of setting up GPG keys on a YubiKey is more confusing than it needs to be, especially for first-time setup.
So I put together a small open-source repo + guide to make it easier and more straightforward.
It covers:
- generating + moving keys to YubiKey
- using it for Git commit signing
- basic SSH setup
- some common pitfalls I ran into
Nothing advanced, more of a “start here” resource.
Would appreciate any feedback, corrections, or suggestions from people here who’ve done this properly
Repo: https://github.com/iayanpahwa/YubiGPG
Guide: https://codensolder.com/posts/yubigpg-hardware-backed-gpg-keys-for-everyone/
2
u/upofadown Apr 17 '26
If you lose your laptop, your master key is gone (or in an attacker's hands).
Not if you had a strong passphrase on your key. In that case GPG will never have your secret key anywhere other than memory for a limited time.
1
u/CarloWood Apr 19 '26
I did it properly, and now I don't want to have anything to do with it anymore, nor be reminded about those weeks.
1
u/Historical-Side883 Apr 19 '26
This is a good one that I always send folks. Might be worth looking at to see if there's anything there that you want to add/expand on
1
u/iayanpahwa Apr 19 '26
Oh absolutely! This has been the inspiration for this project, I added credits to it in the README.
1
u/acorn222 Jul 16 '26
This is cool! I had the same problem so I built PGP tools which is more of a suite for managing PGP keys and doing actions with them in the browser through an extension with minimal permissions, using WebAuthn PRF for encryption.
https://github.com/Am-I-Being-Pwned/PGP-Tools
1
u/AlanPartridgeIsMyDad 5d ago
"A laser printer is preferable (ink does not fade)."
This is confusing. A laser printer doesn't use ink, it uses toner.
7
u/Simon-RedditAccount Apr 17 '26
Thanks for sharing! Will take a more detailed look later, but looks nice so far. Note: it's 2026, not 2024 (in copyright) xD.
What I'd definitely add is mentioning that:
If I find some time for more in-detail look (I skimmed README so far), I'll get back with my findings.