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 portableget_owner()function using POSIX-definedls -ldoutput format with
intelligent field parsing to distinguish space-in-username from normal owner/group fields. - Fixed pidfile generation to properly quote
SSH_AUTH_SOCKpaths containing spaces while
leavingSSH_AGENT_PIDunquoted (numeric value). Rewrotewrite_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
-soption 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--extendedmode support.
Based on work by @mikkoi with significant enhancements for keychain 2.9.x features:- Dynamically parses
keychain --helpfor up-to-date option completion - Completes SSH key names from
~/.ssh/*.pubfiles - Completes GPG key IDs (8-character short format)
--extendedmode:sshk:<tab>,gpgk:<tab>,host:<tab>with prefix completion- Detects hostnames from
~/.ssh/configforhost:completion - ShellCheck compliant
(#186)
- Dynamically parses
- Added Makefile targets:
install-completionsanduninstall-completionsfor 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-utils→coreutils, addedRecommends: 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