Sites Git credentials: secure authentication from Codex and token revocation behavior

We’re trying to deploy an existing ChatGPT Site from Codex Desktop on macOS. The source and build are tested, and the Sites connector successfully issues a short-lived repository write credential through create_source_repository_write_credential.

Authentication worked for a read-only Git operation. However, Codex’s automatic approval review rejected a push because passing the Bearer token through git -c http.extraHeader=... exposes it in the execution-tool transcript.

Git supports --config-env=http.extraHeader=SITES_AUTH_HEADER, but we haven’t found a supported way to transfer the connector-issued token into that environment variable without including it in another logged tool argument.

Could OpenAI clarify:

  1. What is the supported way to securely authenticate a Sites source push from Codex Desktop?

  2. Does issuing a new source-repository credential immediately revoke the previous token, or can both remain valid until their respective expiration times?

  3. Is there an explicit revocation operation for these credentials?

  4. Is there a supported upload or publishing flow that handles source authentication internally?

We’re asking specifically about Sites source-repository write tokens, not OpenAI API keys, ChatGPT login tokens, or Site visitor authentication.

By using the CLI in codex it worked (AI steps):

Here’s how authentication worked:

  1. Requested a short-lived, repository-scoped token from the Sites connector.
  2. Held the response in tool-session memory without printing it.
  3. Passed the token to Git through a command-scoped environment variable, using --config-env=http.extraHeader=SITES_AUTH_HEADER.
  4. Disabled shell tracing with set +x and redacted the token from returned command output.
  5. Cleared the stored credential afterward.