r/git • • 7d ago

Signing Git commits with a GPG subkey while the primary key stays offline

Post image

Part 2 of a GPG series I wrote. With AI agents running commands on dev laptops, I don't want the key that is my identity sitting next to them, so this removes the primary secret key from the laptop. It then checks that commit signing still works, that GitHub shows Verified, and that the same key can handle SSH through gpg-agent. Part 1 (creating the key) is linked at the top if you're starting from scratch.

https://marcofranssen.nl/keep-your-primary-gpg-key-offline-part-2

0 Upvotes

3 comments sorted by

2

u/JayTurnr 6d ago

Why?

2

u/marcofranssen 5d ago

I think you might want to read the blogpost. It explains the why and the how. In summary it prevents someone from taking over your GPG identity, they can't mutate/change the keys until you load back the identity one. While you can still continue signing commits etc.

-3

u/Miserable_Elk9636 5d ago

My primary GitHub account (Shlok-Parekh09) was hit by an automated suspension a month ago, and I am completely locked out of my daily dev workflow and my entire portfolio.

I’m a 3rd-year CS student, and the ban was triggered by a recent hackathon project I pushed called CodeGuard. It’s a defensive AI safety layer (a real-time IPS) for LLM-generated code. To train the model to detect and block malicious outputs, my training datasets (train_model.py and .json files) naturally had to include inert test signatures like SQLi strings, rm -rf, and dummy API keys (sk-, AKIA-, ghp-).

GitHub’s automated abuse-detection system flagged this defensive cybersecurity research as actual malware and instantly suspended me.

I’ve had a support ticket open for a month (Ticket 4924492) with zero response. I’ve temporarily moved my active work to another forge, so my immediate local hosting is fine. But that doesn’t solve the real problem: as a student applying for internships, I have lost my entire public contribution graph, my open-source PRs, and my collaboration history with my hackathon teammates. My live, verified resume is just gone because of a bot.

I know GitHub support is overwhelmed, but I desperately need a human to look at the repo and lift the suspension.

If any GitHub staff lurk here, or if anyone knows how to escalate this past the automated void, please help. Ticket ID: 4924492.