Skip to content

fix(git): diagnose unsupported Nostr credential helpers#2345

Open
yashhsm wants to merge 1 commit into
block:mainfrom
yashhsm:agent/diagnose-old-git-nostr-auth
Open

fix(git): diagnose unsupported Nostr credential helpers#2345
yashhsm wants to merge 1 commit into
block:mainfrom
yashhsm:agent/diagnose-old-git-nostr-auth

Conversation

@yashhsm

@yashhsm yashhsm commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Addresses the old-Git diagnostic portion of #2316.

  • mark Buzz-managed relay Git operations as requiring Nostr authentication
  • fail git-credential-nostr with an actionable Git 2.46+ message when credential authtype is unavailable
  • preserve silent decline for globally configured helpers on unrelated remotes
  • add helper-level and desktop command regression coverage

Why

Git before 2.46 cannot use credential-helper authtype, which Buzz's NIP-98/Nostr authorization requires. The helper previously returned empty output, so in-app merge fell through to could not read Username and hid the actual compatibility problem.

The explicit BUZZ_NOSTR_GIT_AUTH_REQUIRED marker is scoped to Buzz-managed relay commands. This avoids turning a global git-credential-nostr installation into a hard failure for non-Buzz remotes.

This intentionally does not implement the broader transport fallback proposed in #2316; it makes the currently supported path fail clearly and safely.

Validation

  • just ci
  • cargo test -p git-credential-nostr (9 passed)
  • regression test demonstrated the pre-fix silent exit before implementation

Risk

Narrow: the new failure only applies when Buzz explicitly marks Nostr authentication as required and Git does not advertise authtype.

Buzz-managed relay Git operations require the credential authtype protocol introduced in Git 2.46. Mark those operations explicitly so git-credential-nostr reports the real requirement instead of silently falling through to a misleading username prompt.

Constraint: Global helper configurations must still decline safely for unrelated remotes

Rejected: Treat any configured Nostr key as Buzz-scoped | would break globally configured helpers on non-Buzz remotes

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Keep BUZZ_NOSTR_GIT_AUTH_REQUIRED scoped to Buzz-managed relay Git commands

Tested: just ci; cargo test -p git-credential-nostr

Not-tested: End-to-end relay merge under an actual Git 2.43 binary
Signed-off-by: Yash Agarwal <yashhsm@gmail.com>
@yashhsm
yashhsm force-pushed the agent/diagnose-old-git-nostr-auth branch from 9df1c16 to a8b1f6b Compare July 22, 2026 07:58
@yashhsm
yashhsm marked this pull request as ready for review July 22, 2026 07:59
@yashhsm
yashhsm requested a review from a team as a code owner July 22, 2026 07:59
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.

2 participants