You just want your internal Gitea to build and deploy repos without fighting IAM policies. Yet each time CI runs in Cloud Run, it asks for secrets, credentials, or tokens that expired an hour ago. The dream is automation that feels invisible. The reality is something between OAuth chaos and permission hell.
Cloud Run is Google’s fully managed container platform that scales to zero and speaks HTTP fluently. Gitea is a lightweight self-hosted Git service that thrives on simplicity and control. Together they can power a compact, auditable CI/CD stack, but only if identity and permissions flow cleanly between them.
Here’s the catch. Cloud Run doesn’t store state and Gitea doesn’t know your workload identity. Without a proper handshake, your builds rely on static tokens hiding in secrets managers. That’s brittle. The smarter way is to combine Cloud Run’s service accounts with Gitea’s fine-grained API tokens via OpenID Connect. In this setup, Cloud Run uses a signed identity token to call Gitea’s API, verifying trust with short-lived credentials that rotate automatically. No more manual updates, no lingering access keys.
To make Cloud Run Gitea integration work smoothly, map each service account in Cloud Run to a Gitea organization or repo permission. Configure scopes tightly, and keep build triggers isolated to limit blast radius. Rotate secrets programmatically, not by hand. When Gitea acts as the source of truth for your pipelines, Cloud Run can fetch, build, and deploy exactly what’s authorized, nothing more.
Quick answer: The easiest way to connect Cloud Run and Gitea is to use Gitea’s API along with Cloud Run’s OIDC identity tokens so Cloud Run can authenticate securely without static keys.