fix(git-credential-nostr): accept BUZZ_PRIVATE_KEY with NOSTR_PRIVATE_KEY fallback - #4723
Open
santhiprakash wants to merge 1 commit into
Open
fix(git-credential-nostr): accept BUZZ_PRIVATE_KEY with NOSTR_PRIVATE_KEY fallback#4723santhiprakash wants to merge 1 commit into
santhiprakash wants to merge 1 commit into
Conversation
…_KEY fallback `git-credential-nostr` was the only Buzz component that did not read `BUZZ_PRIVATE_KEY`. Users who exported the ecosystem-standard env var got silent wrong-identity signing because the helper fell back to a keyfile or to an unset `NOSTR_PRIVATE_KEY`. - Resolve identity in this order: `$NOSTR_PRIVATE_KEY`, `$BUZZ_PRIVATE_KEY`, then `git config nostr.keyfile`. - Warn on stderr when both env vars are set to different values and `$NOSTR_PRIVATE_KEY` wins, so the conflict is at least audible. - Update the helper README and `docs/remote-agents.md` to document the precedence. - Add integration tests for (a) `BUZZ_PRIVATE_KEY`-only and (b) both envs set to different values with the expected warning. Fixes block#4712. Signed-off-by: Santhi Prakash <b.santhiprakash@gmail.com>
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.
Summary
git-credential-nostrwas the only Buzz component that did not readBUZZ_PRIVATE_KEY. Users who exported the ecosystem-standard env var got silent wrong-identity signing because the helper fell back tonostr.keyfile(or no credentials) instead.This change:
$NOSTR_PRIVATE_KEY,$BUZZ_PRIVATE_KEY, thengit config nostr.keyfile.$NOSTR_PRIVATE_KEYwins, so the silent wrong-identity trap is at least audible.docs/remote-agents.mdto document the precedence.BUZZ_PRIVATE_KEY-only and the conflict-warning path.Related issue
Fixes #4712.
No duplicate PR found (searched open/closed PRs for
4712,BUZZ_PRIVATE_KEY, andgit-credential-nostr).Testing
Targeted package-level verification:
All passed:
cargo fmt— cleancargo clippy— clean (-D warnings)cargo test -p git-credential-nostr— 10 integration tests passed (including the two new regression tests)Full
just ciwas not run because this is an isolated Rust crate change; the targeted tests above exercise the modified surface.