POST /v1/agents/runtime/{runtime_id}/git/clone
Network access
Guest egress is deny-by-default, so a runtime cannot reach GitHub until you attach a
network policy that allows it.
Clone, fetch, pull, and push all fail with a connection error otherwise.
The example above already attaches an allowlist for github.com:443. allow_all is the broader alternative:
URL schemes
url must use http://, https://, ssh://, git://, or SCP-style SSH
(for example git@github.com:org/repo.git). The file:// scheme is rejected.
Private repositories
Pass auth_token to authenticate an HTTPS clone. It is sent as an HTTP Authorization
header for that one git invocation, the same mechanism CI checkout steps use.
The token is not written into the repository. Nothing is stored in
.git/config, and remote.origin.url stays clean, so code running in the
sandbox afterwards cannot read the credential back out of the checkout.
Because nothing is persisted, every later operation that contacts the remote
takes its own auth_token:
A token still travels through the API to the runtime, so use the narrowest,
shortest-lived one that the operation needs.
Parameters
Response
A clone of a large repository can take several minutes. The API allows up to 10
minutes for git operations that contact a remote; use depth to keep clones fast.