Skip to content

Expand ~ in user.signingKey for SSH signing#158

Open
simono wants to merge 1 commit into
mystor:mainfrom
simono:fix/signingkey-tilde-expansion
Open

Expand ~ in user.signingKey for SSH signing#158
simono wants to merge 1 commit into
mystor:mainfrom
simono:fix/signingkey-tilde-expansion

Conversation

@simono

@simono simono commented May 4, 2026

Copy link
Copy Markdown

Python's open() and ssh-keygen -f do not expand tilde, so a user.signingKey value like ~/.ssh/id_ed25519.pub would fail with a file-not-found error. Git itself expands ~ here, so this is a behaviour mismatch.

Fix: expand the path with Path.expanduser() before it is used as a file path.

A regression test is included that configures user.signingKey as a tilde path and verifies signing succeeds.

Python's open() and ssh-keygen -f do not expand tilde, so a signingKey
value like ~/.ssh/id_ed25519.pub would fail with a file-not-found error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant