Daytona icon

Daytona

Manage Daytona sandboxes, snapshots, and volumes; run code and shell commands; drive a full Git pipeline; and manage the sandbox filesystem

Git → Clone

AI-generated

Summary

Clone a Git repository into the specified path in a Daytona sandbox. Optionally check out a branch or commit and provide HTTPS credentials for a private repository.

Inputs

  • Sandbox ID (required) — ID of the sandbox to clone into.
  • Repository URL (required) — Git repository URL to clone.
  • Path (required) — Absolute destination path inside the sandbox. Sandboxes run as the non-root daytona user, so use a writable location such as /home/daytona/ or /tmp/.
  • Branch — Branch to check out after cloning. Leave empty to use the repository's default branch. Ignored when Commit ID is set.
  • Commit ID — Commit SHA to check out; takes precedence over Branch.
  • Username — HTTPS username for a private repository.
  • Password — HTTPS password or personal access token for a private repository.

Output shape

A single item with a JSON object

The JSON includes success, sandboxId, path, repositoryUrl, branch, and commitId. Credentials embedded in the repository URL are redacted in the output URL. Branch and commitId are omitted when not set; when a commit is set, branch is omitted.

Links

Discussion