Skip to content

Implement GPG Commit Signing with Seamless Multi-Environment Support #4

@LTSCommerce

Description

@LTSCommerce

Overview

Implement GPG commit signing across all development environments (local desktop, LXC containers, Docker containers including Claude YOLO) with full security and minimal hassle.

User Experience Requirements

Security Goals

  • Full cryptographic verification - All commits verifiable on GitHub with "Verified" badge
  • Private key protection - Keys never leave the host system
  • Agent-based authentication - Passphrase entered once, cached securely via gpg-agent
  • No key duplication - Single GPG key on host, forwarded to all containers

Usability Goals

  • Zero manual intervention - After initial setup, signing should be transparent
  • Single passphrase prompt - Enter passphrase once per session (or once per day)
  • Automatic in all environments - Works seamlessly in:
    • Local desktop git operations
    • LXC container development
    • Docker containers (Claude YOLO via ccy)
    • Any future containerized workflows
  • No per-container setup - Containers inherit signing capability automatically
  • Integrated with gnome-keyring - Passphrase cached by GNOME Keyring on host
  • Survives reboot - Configuration persists across system restarts

Target Environments

  1. Host (Fedora Desktop) - Primary GPG key storage and gpg-agent
  2. LXC Containers - Development containers with full system access
  3. Docker Containers - Isolated containers (especially Claude YOLO)
  4. Future Containers - Any new containerized development workflows

Implementation Scope

Phase 1: Host Setup

  • GPG key generation (RSA 4096 or Ed25519)
  • Configure git for automatic commit signing
  • Set up gpg-agent with passphrase caching
  • Integrate with gnome-keyring for GUI passphrase prompts
  • Export public key for GitHub upload (manual step with instructions)

Phase 2: Container Forwarding

  • Configure gpg-agent extra-socket for forwarding
  • LXC container gpg-agent socket mounting
  • Docker container gpg-agent socket mounting (especially Claude YOLO)
  • Handle UID/permission mappings between host and containers
  • Set required environment variables (GPG_TTY, GNUPGHOME)

Phase 3: Automation

  • Ansible playbook for host GPG setup
  • Ansible playbook for container configuration
  • Update Claude YOLO wrapper to mount GPG socket
  • Documentation and troubleshooting guide

Success Criteria

  • Can make signed commits on host with single passphrase prompt per session
  • LXC containers can make signed commits without passphrase prompts
  • Claude YOLO (ccy) can make signed commits without passphrase prompts
  • All commits show "Verified" badge on GitHub
  • Setup is reproducible via Ansible playbooks
  • No keys exist in containers (only on host)
  • Passphrase caching works across all environments

Non-Goals

  • ❌ Multiple GPG keys per environment
  • ❌ Hardware token (YubiKey) support in v1 (future enhancement)
  • ❌ Automatic public key upload to GitHub (requires API, manual is fine)

References

  • TODO: Add research findings in comments below

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions