Development record
An automated git call in an abcd-managed checkout raised a macOS keychain prompt asking the person for their github.com credentials, which confused them: nothing they had started asked for credentials. At 08:12:45 on 2026-10-17 the system log shows git-credential-osxkeychain (Homebrew git 2.52.0) asking for the github.com keychain item under the account all abcd sessions run as; the person denied it. Their own global git config sends github.com credentials to the gh helper and clears the keychain helper, so the call ran without that config (a temporary HOME, as tests set, or an isolated global config) while still reading the system gitconfig, which names osxkeychain. The likeliest source is a test run in a peer's worktree that reached https://github.com; the exact test is not yet confirmed. A person who learns to approve such prompts would hand a GitHub credential to a test or a background process.
An automated git call in an abcd-managed checkout raised a macOS keychain prompt asking the person for their github.com credentials, which confused them: nothing they had started asked for credentials. At 08:12:45 on 2026-10-17 the system log shows git-credential-osxkeychain (Homebrew git 2.52.0) asking for the github.com keychain item under the account all abcd sessions run as; the person denied it. Their own global git config sends github.com credentials to the gh helper and clears the keychain helper, so the call ran without that config (a temporary HOME, as tests set, or an isolated global config) while still reading the system gitconfig, which names osxkeychain. The likeliest source is a test run in a peer's worktree that reached https://github.com; the exact test is not yet confirmed. A person who learns to approve such prompts would hand a GitHub credential to a test or a background process.
Mechanism
Traced in code by a peer session on 2026-10-17, the same morning:
- abcd's networked git runs under
ScrubbedEnv. That includesgitutil.Net,NetEachandNetInput, the claim remote and status code, andgitutil.RemoteHeadBranch. ScrubbedEnvstrips everyGIT_CONFIG_*variable. A test'sGIT_CONFIG_NOSYSTEMorGIT_CONFIG_GLOBALtherefore never reaches the call, and the system gitconfig still applies, with itscredential.helper=osxkeychain.- With
HOMEpointed at a temporary directory, the person's own global config, with its gh helper and keychain reset, is not read. - Against a
https://github.com/<owner>/<repo>that does not exist, GitHub answers 401. git then asks the keychain helper, which raises the dialog. A public repository answers anonymously and would not prompt.
At 08:12:45 several test runs were live across sessions: two in one peer's worktrees (the claim, loop and cloudscripts packages among them), and others' claim, cli and loop runs. Candidate tests that drive production code against a github.com origin:
cloud_handback_test.go: originhttps://github.com/acme/widgets.git, relying on a repository-localinsteadOfthat a ScrubbedEnv path without that config would miss;cloud_brief_test.go;- loop
configwatch_test.go: aurl.*.insteadOfcarrying a token.
The prompt can recur on any machine whose system gitconfig names a credential helper, whenever these packages run, preflight included.
Grounds
- pursued: git refuses a transport its protocol policy disallows before connecting, and an empty credential.helper in command scope clears every helper a config file names; shown wrong if a test under the guard raises a credential prompt or reaches a non-local remote
Frontmatter
| id | iss-2610170718356567 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2610170718356567-automated-git-calls-raise-keychain.md
open on GitHub ↗ · commit history ↗