github danielrobbins/keychain 2.9.7
keychain 2.9.7

latest release: 2.9.8
2 days ago

keychain 2.9.7 (31 Oct 2025)

This release fixes critical issues with spaces in HOME directories and usernames, and adds official Git Bash on Windows compatibility.

Bug fixes:

  • Fixed keychain failures when HOME directory path contains spaces (e.g., C:\Users\John Doe).
    (#188)
  • Fixed username detection for usernames containing spaces (e.g., "Mathew Binkley" on Windows).
    Implemented portable get_owner() function using POSIX-defined ls -ld output format with
    intelligent field parsing to distinguish space-in-username from normal owner/group fields.
  • Fixed pidfile generation to properly quote SSH_AUTH_SOCK paths containing spaces while
    leaving SSH_AGENT_PID unquoted (numeric value). Rewrote write_pidfile() to use robust
    eval-in-subshell approach for extracting variable values from ssh-agent output.
  • All pidfile formats (sh/csh/fish) now correctly handle paths with spaces.
  • Fixed ssh-agent invocation to always use -s option for Bourne-compatible output, simplifying
    pidfile generation and improving compatibility across different environments.
    (#185)

Testing and quality improvements:

  • Added scripts/test-space-home.sh - automated test harness that simulates HOME directories
    with spaces and validates proper handling. Returns proper exit codes for CI integration.
  • Integrated space-in-home test into GitHub Actions release workflow to prevent regressions.
  • Added ShellCheck disable comments with justification for intentional POSIX ls usage.
  • Fixed Unicode arrow characters in comments that caused ShellCheck errors.

New features:

  • Added bash completion support (completions/keychain.bash) with intelligent context-aware
    completion for command-line options, SSH keys, GPG keys, and full --extended mode support.
    Based on work by @mikkoi with significant enhancements for keychain 2.9.x features:
    • Dynamically parses keychain --help for up-to-date option completion
    • Completes SSH key names from ~/.ssh/*.pub files
    • Completes GPG key IDs (8-character short format)
    • --extended mode: sshk:<tab>, gpgk:<tab>, host:<tab> with prefix completion
    • Detects hostnames from ~/.ssh/config for host: completion
    • ShellCheck compliant
      (#186)
  • Added Makefile targets: install-completions and uninstall-completions for optional
    bash completion installation (separate from default install target).
  • Updated RPM spec file (keychain.spec.in) for modern distributions:
    • Modernized description to focus on OpenSSH and GnuPG (removed obsolete ssh.com/Sun SSH)
    • Updated dependencies: sh-utilscoreutils, added Recommends: bash-completion
    • Added bash completion installation to RPM package

Documentation:

  • Updated keychain.pod with detailed implementation notes for space handling, POSIX compliance,
    and the robust eval approach used in pidfile generation.
  • Standardized option ordering in keychain.pod to follow Unix convention (short option first,
    then long option), ensuring compatibility with bash completion regex patterns.
  • Added comprehensive COMPATIBILITY section to keychain.pod documenting:
    • Minimum OpenSSH version (7.3+) and supported features
    • GnuPG 2.1+ requirements for gpg-agent integration
    • Shell compatibility (Bourne/POSIX, csh/tcsh, fish)
    • Git Bash (MSYS2) for Windows - officially documented as supported platform
    • Legacy SSH implementation status (SunSSH, ssh.com)
    • Systemd user environment integration
    • Spaces in HOME and paths handling details
  • Updated README.md with bash completion installation instructions for both system-wide
    and user-only installations.

Build Provenance

Artifact SHA256
keychain ccf51b708de94905403966c467fb7df965016c12b8e30aca458cf5e14129b9ce
keychain.1 ffccaa49f5b8136df211256f0607c440d80957302a079a2c6c6a928cf3404a1d

Tag commit SHA1: dd1ebe4f546bb2088541ae28725f9d2ea2c87325

Don't miss a new keychain release

NewReleases is sending notifications on new releases.