Skip to content

feat: treat anonymous credential prompts as unavailable repositories - #21

Merged
qiansc merged 1 commit into
mainfrom
feat/anonymous-credential-prompt
Nov 14, 2026
Merged

qiansc merged 1 commit into
mainfrom
feat/anonymous-credential-prompt

Conversation

@qiansc

@qiansc qiansc commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Background

GitHub answers an anonymous request for a private or missing repository with a credential prompt; Git reports could not read Username … terminal prompts disabled, which was classified as GIT_FETCH_FAILED, so the registration form only offered a retry instead of a token prompt.

Changes

  • remoteFailure reports "could not read username" as GIT_REPOSITORY_UNAVAILABLE.

Compatibility

Fetch jobs failing this way now report GIT_REPOSITORY_UNAVAILABLE instead of GIT_FETCH_FAILED; both continue with the next credential, so the retry order is unchanged.

Testing

  • go test ./internal/gitstore ./internal/service pass with a new diagnostic case.
  • Local dev server: a missing GitHub repository returns 404 GIT_REPOSITORY_UNAVAILABLE with settings_url/guidance and is not stored; a readable one registers and replays.

🤖 Generated with Claude Code

GitHub answers an anonymous request for a private or missing repository
with a credential prompt ("could not read Username"). Report it as
GIT_REPOSITORY_UNAVAILABLE so registration offers to bind a token
instead of only suggesting a retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qiansc
qiansc merged commit 3336fe2 into main Nov 14, 2026
3 checks passed
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