Desktop v0.5.0: merging a relay-hosted PR fails with 'terminal prompts disabled' (credential helper not applied)
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
### Environment
- Buzz Desktop v0.5.0 (macOS), relay on v0.5.0-era main (`1d3b810a`)
- Repo hosted on the relay's git server (NIP-98 smart HTTP); its kind:30617 announcement carries a valid `buzz-channel` tag and the user is the channel owner
- `git` 2.53.0 on PATH (authtype-capable, well above the 2.46 floor)
### Symptom
Clicking **Merge** on a kind:1618 PR in Desktop Projects fails with an error containing **"terminal prompts disabled"** (git's `could not read Username … terminal prompts disabled`). The merge never completes.
Meanwhile, on the **same machine** with the same git binary, plain CLI `git fetch`/`push` against the same relay repo authenticate fine via the bundled `git-credential-nostr` (with `NOSTR_PRIVATE_KEY` set), so relay-side auth and the helper itself are healthy. The failure is specific to Desktop's merge path.
### Analysis pointers
`desktop/src-tauri/src/commands/project_git_exec.rs` (`configure_git_auth`) sets `GIT_TERMINAL_PROMPT=0`, wipes global/system config, and injects `credential.helper` + `NOSTR_PRIVATE_KEY` **only when** `resolve_command("git-credential-nostr")` returns a path:
```rust
if needs_credentials {
let Some(cred_helper) = &auth.credential_helper else {
return apply_git_config(command, &entries); // proceeds credential-less
};
```
When resolution returns `None` (or the helper declines), the command runs credential-less and git's only surface is the cryptic terminal-prompts error, with no hint about the actual cause.
### Suggestions
1. When `needs_credentials` is true and the helper cannot be resolved, fail fast with an actionable error ("git-credential-nostr not found — reinstall/relink") instead of running git credential-less.
2. Log the resolved helper path (or the resolution failure) so field debugging doesn't require reading the source.
3. Map the `terminal prompts disabled` stderr to a friendlier message in the merge UI.
Happy to gather logs or test a fix build.
Contributor guide
Research direction
Start in desktop/src-tauri/src/commands/project_git_exec.rs at configure_git_auth and trace the credential-helper resolution path when resolve_command("git-credential-nostr") returns None. Reproduce the relay-hosted merge failure, then verify that missing or declined credentials produce an actionable error rather than a credential-less git command, with useful logging or clearer merge-UI feedback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- desktop, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100