The Simplest Way to Make Buildkite and Gitea Work Like They Should
You pair buildkite and gitea by linking repo events to your build agents. A git push sends a webhook to trigger a test run on your servers. This setup keeps your source code and build runners on your own machines. Your team gets fast builds while the cloud orchestrator tracks job status. How buildkite and gitea share keys and data Gitea holds your git repos on a local server or private cloud. Buildkite runs a central dashboard that schedules jobs across your build agents. When a developer p
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You pair buildkite and gitea by linking repo events to your build agents. A git push sends a webhook to trigger a test run on your servers.
This setup keeps your source code and build runners on your own machines. Your team gets fast builds while the cloud orchestrator tracks job status.
How buildkite and gitea share keys and data
Gitea holds your git repos on a local server or private cloud. Buildkite runs a central dashboard that schedules jobs across your build agents.
When a developer pushes code, Gitea sends an HTTP post to the cloud API. That message tells the build queue which branch and commit to test next.
Your local build agent polls the queue and picks up the new job. The agent then uses an SSH key or token to pull code from Gitea.
As the build runs, the agent sends status updates back to the git server. Developers see green checks or red failures right inside their pull requests.
Source code stays inside your private network during the whole build process. Only job logs and metadata go back to the cloud dashboard.
Common failure modes and how to scope roles
Many teams use one admin account to link their git server and build runners. That single token often has write access to every repo on the server.
If an attacker steals that token from a runner, they can change production code. Shared SSH keys across all build machines create the exact same risk.
Another common issue happens when teams expose their private git server to the internet. They open inbound firewall ports just so the cloud dashboard can reach it.
You do not need inbound ports open for git pulls at all. Your build agents can sit inside the same private network as your git server.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Only the outbound webhook from Gitea needs to reach the public build API. For status updates, the build system can call back through a tight firewall rule.
You can also have the local build agent post commit statuses directly to Gitea. This keeps all git API traffic inside your private network perimeter.
Give each pipeline its own deploy key with read-only access to one repo. Never let a standard test runner push commits back to your main branch.
Rotate your webhook secrets and API tokens on a set schedule every few months. Check your git server logs to see which agent pulled code and when.
Managing secrets and runner access during builds
Build agents do more than just pull source code from your git repos. They also push container images, run database changes, and deploy apps to production.
Teams often store database passwords and cloud keys directly in pipeline settings. Any person who can edit the build script can print those secrets in logs.
Store secrets in a dedicated secret manager on your own network instead. Let the build agent fetch only the keys needed for that specific branch.
Lock down which branches can trigger builds that touch production data. Pull requests from outside forks should never run on agents with production keys.
Split your build agents into separate pools based on trust and job type. Run untrusted test jobs on one pool and production deploys on another.
Wipe the build folder and temporary files after every single job finishes. This stops one build job from reading secrets left behind by an earlier run.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
Can Buildkite trigger builds from a private Gitea server?
Yes, Gitea just needs outbound internet access to send webhooks to the build API. Your build agents then pull the code over your local private network.
Should build agents use SSH keys or personal tokens for Gitea?
Use read-only repo deploy keys for pulling code onto your build agents. Use a scoped bot account token only for posting commit status updates back.
How do we stop pull requests from stealing production secrets?
Put production deploy agents in a separate queue that only runs on main branches. Block untrusted pull requests from running on agents that hold production credentials.
Related guides
In this post