secrets

Put Git Credential

Changed on

Register or overwrite a GitHub host/owner credential token (design doc 4.2). Never returned by any endpoint.

host_owner is normalized (lowercase host, trimmed) before storage -- see :func:~palmimo_portal.core.secrets.normalize_host_owner -- so GitHub.com/Foo/ and github.com/Foo land on the same entry.

Also clears :attr:~palmimo_portal.ports.AppRecord.credential_rejected on every app scoped to host_owner -- a rewritten credential must resume periodic update checks (design doc 3.6), not stay skipped until one happens to succeed. Skipped when apps.json is corrupt: writing clear_credential_rejected's result back would replace the corrupt file with a fresh empty ledger, destroying whatever POST /apps/reset was meant to recover instead of the credential save.

Raises: PortalError: 422 invalid_host_owner if host_owner does not normalize to host/owner shape; 422 invalid_secret_value if the token contains a newline.

put/api/v1/git-credentials/{host_owner}

Request

  • The document declares no server URL.
  • Auth: none declared

Path parameters

host_ownerstring required

Request body

valuestring required

Response

Successful Response

app_idsstring[]
host_ownerstring required
rejected_atnumber nullable
updated_atnumber required

Changes