## Why
Config servers that publish OAuth metadata still required administrators
to configure OAuth endpoints explicitly for Codex to use them.
## What changed
- Discover OAuth metadata when `config_server.oauth` is omitted. Use
explicit settings when provided, and fetch managed configuration
anonymously when discovery finds no metadata.
- Have the Git credential helper resolve the config server before
fetching managed configuration. It refuses explicit or discovered
OAuth so it can apply workspace policy without opening the OS keyring.
- Apply local network policy to discovery during `codex logout`.
## Testing
Cover app-server recovery after a discovery failure, Git credential
helper rejection of explicit OAuth without a network request, and
logout discovery blocked by local network policy.
GitOrigin-RevId: 1ad84effef48fd9b56371ee177bd53c54f3e87b8
## What changed
Add the hidden `codex git-credential` command to supply an existing file-backed ChatGPT login as an ephemeral Bearer credential through Git's `authtype` protocol.
Restrict credentials to HTTPS requests under `backend-api/codex/sites/git/` on `chatgpt.com` or `chatgpt-staging.com`, matching the configured origin. Check managed workspace policy and reject expired or changed logins before returning credentials. Ignore repository configuration when selecting authentication settings.
The helper does not refresh tokens or modify the saved login; `store` and `erase` are no-ops. Return `quit=true` when authentication is unavailable or fails so Git does not fall back to prompting.
## Testing
Add coverage for capability advertisement before login, reading only the first credential record, and declining personal access tokens without an authentication API lookup.
GitOrigin-RevId: 2f96af1eeb7d05e3d893367137103a7adbc02742