All posts

The Simplest Way to Make Cloud Run Gitea Work Like It Should

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. To

Free White Paper

End-to-End Encryption + Sarbanes-Oxley (SOX) IT Controls: The Complete Guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free. No spam. Unsubscribe anytime.

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.

Continue reading? Get the full guide.

End-to-End Encryption + Sarbanes-Oxley (SOX) IT Controls: Architecture Patterns & Best Practices

Free. No spam. Unsubscribe anytime.

A few best practices pay off fast:

  • Link Cloud Run service accounts to Gitea permissions one-to-one
  • Store no long-lived tokens, rely on dynamic OIDC assertions
  • Enforce repository-level webhooks for builds, not system-wide triggers
  • Log every build run with Cloud Logging for audit trails
  • Validate identity before fetching repos or pushing images

When you do it right, your deployments stop nagging for credentials. Developers push code, Gitea fires a webhook, Cloud Run spins a build, and everything just flows. It trims down cognitive load and accelerates developer velocity. Less waiting, fewer Google Cloud console tabs, more shipping.

Platforms like hoop.dev turn those access rules into guardrails that enforce policy automatically. Instead of rewriting IAM each sprint, teams define intent once and let it propagate across every environment. That kind of environment-agnostic identity awareness is what keeps automation from becoming an attack surface.

As AI-assisted deployment pipelines emerge, this clarity matters even more. When automated agents trigger builds or review pull requests, identity boundaries and role mappings keep them safe. Smart identity lets AI act autonomously without exposing source control or production secrets.

Cloud Run paired with Gitea feels almost unfair when you untangle the token mess. It’s compact, fast, and governed by simple, verifiable rules. That’s how modern infra should feel.

See an Environment Agnostic Identity-Aware Proxy in action with hoop.dev. Deploy it, connect your identity provider, and watch it protect your endpoints everywhere—live in minutes.

Get started

See hoop.dev in action

One gateway for every database, container, and AI agent. Deploy in minutes.

Get a demoMore posts