Skip to content

fix: wire credential helper automatically in git-remote-did#167

Merged
LiranCohen merged 2 commits intomainfrom
fix/push-auth-e2e
Mar 3, 2026
Merged

fix: wire credential helper automatically in git-remote-did#167
LiranCohen merged 2 commits intomainfrom
fix/push-auth-e2e

Conversation

@LiranCohen
Copy link
Contributor

Summary

  • git-remote-did now injects -c credential.helper=git-remote-did-credential and -c credential.useHttpPath=true when spawning git remote-http, so push auth works out of the box without gitd setup
  • git-remote-did-credential now fails loudly with actionable hints instead of silently returning nothing when auth can't proceed (no daemon, no password, missing path)

Problem

git push to a DID remote prompted Username for 'http://localhost:9418': and failed with fatal: Authentication failed. The credential helper was never invoked because git-remote-did didn't tell git about it.

Root cause

git-remote-did resolves the DID to an HTTP URL and spawns git remote-http, but passed no credential configuration. Git had no way to know about git-remote-did-credential unless the user had previously run gitd setup (which sets credential.helper globally). Without that, git fell back to interactive prompts.

Build, test, lint

All pass: 1119 tests, 0 failures, 0 lint warnings.

git-remote-did spawns `git remote-http` but never told git which
credential helper to use.  Git fell back to an interactive username/
password prompt that can't work for DID auth.

Now injects `-c credential.helper=git-remote-did-credential` and
`-c credential.useHttpPath=true` when spawning the child process.
Push auth works out of the box — no `gitd setup` required.

Also makes the credential helper fail loudly instead of silently
returning nothing when it can't authenticate (no daemon, no password,
missing path).  Users now see actionable error messages with hints.
@LiranCohen LiranCohen merged commit 3ae9b29 into main Mar 3, 2026
6 of 8 checks passed
@LiranCohen LiranCohen deleted the fix/push-auth-e2e branch March 3, 2026 02:54
@github-actions github-actions bot mentioned this pull request Mar 3, 2026
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