Skip to main content
Credential vending gives a process in a sandbox a credential only at the moment it needs one. A tool on your own Tilde tool server mints a short-lived, narrowly scoped credential, and the process fetches it through the blueprint. Nothing in the VM holds a long-lived secret, and every call is in the agent’s trace. Use it in any edition, for systems that GitHub egress does not cover: other Git hosts, package registries, cloud CLIs, and databases. In Tilde Cloud and Tilde Enterprise, use GitHub egress for GitHub. It keeps the credential out of the VM entirely. This guide builds a Git credential helper in three steps: write the tool, switch it on for the blueprint, and point git at it.

1. Write the tool

The tool receives git’s request, protocol, host, and path, and returns username and password. This one mints a GitHub App installation token for one repository on an allowlist. GitHub expires it within an hour.
tool-server.ts
Run the server with TILDE_TOOL_HOST_TOKEN set, and keep the private key on the server only. See Add a Tilde tool server. The Python SDK provides the same API in tilde.tool_hosts. When a process in a sandbox calls a tool, ctx.sandboxId names the sandbox. ctx.agentId and ctx.threadId name the agent and thread it was launched for, when the reuse mode ties it to one. In Python, they are context.sandbox_id, context.agent_id, and context.thread_id. Use them to scope credentials further.

2. Switch the tool on for the blueprint

Open the blueprint in Sandboxes, and select Tools. Add the tool server, and switch on git_credentials. Processes call it by the source’s slug and the tool name. This guide assumes the slug creds, so the tool is creds.git_credentials. Do not give this tool to the agent. Git fetches the credential itself when it needs one.

3. Point git at it

Git runs a credential helper with get, and writes the request to its standard input as key=value lines. This helper calls the tool through the local API, and prints the lines git expects.
git-credential-tilde
Install it in your image, and point git at it. credential.useHttpPath makes git send the repository path, which the tool needs.
Dockerfile
Ask the agent to clone an allowed repository and push. In the agent’s trace, each credential request is an execute_tool creds.git_credentials span under the sandbox.exec that ran git. A repository off the allowlist fails with the tool’s error.
A tool’s output is recorded in the trace like any other tool call, so the token appears there. Vend only short-lived credentials scoped to what the process needs, and restrict who can read traces.

Other systems

The same pattern works for anything a process in the sandbox must reach:
  • Package registries. Return a short-lived npm, PyPI, or container registry token, and fetch it from a credential helper.
  • Cloud CLIs. Return temporary credentials, such as AWS STS credentials for one role, through the CLI’s credential process setting.
  • Databases. Return a short-lived database user or IAM authentication token.
If the tool server can do the work itself, return the result instead of a credential. The credential then never enters the sandbox.