Repository navigation
Conversation
op-ssh-sign writes the signature by replacing the buffer file's extension (x.buf -> x.sig), while ssh-keygen appends (x.buf.sig). The buffer now has no extension, like git's own signing buffer, so both signers land on the same path. Fixes cheat2001#58
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Fixes #58. Committing with 1Password signing (
gpg.ssh.program = op-ssh-sign) failed with "ssh-keygen produced no signature", although 1Password approved the request.sign_with_sshwrote the commit buffer toangkorgit-sign-<pid>-<nanos>.bufand read the signature from….buf.sig.ssh-keygen -Y signappends.sigto the file name, butop-ssh-signreplaces the extension, so it wrote….sig. Git's own signing buffer (.git_signing_buffer_tmpXXXX) has no extension, which is whygit commitworks with the same config.The buffer file now has no extension (
temp_file("")), so both signers write to<buffer>.sig.Verified on macOS 27.0.1 with 1Password 8.12.38: the engine's
sign_bufferreturns a signature for the 1Password key, and a commit from a local build is signed.Screenshots
None, this is an engine-only change.
Checklist
pnpm typecheck && pnpm testpasscargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo testpass (if Rust changed)tests/git_engine.rstracked()wrapper where undoableCLAUDE.mdupdated if conventions/architecture changedCo-authored-by: <tool>,Generated with …)