Skip to content

Clone a repository

POST
/v1/sandbox/{sandboxID}/git/clone

Clone a git repository into the sandbox filesystem.

sandboxID
required
string

Unique sandbox identifier.

object
url
required

Repository URL to clone.

string
Example
https://github.com/user/repo.git
path
required

Destination path inside the sandbox.

string
Example
/home/user/repo
branch

Branch to clone.

string
nullable
commit_id

Specific commit to checkout after cloning.

string
nullable
depth

Shallow clone depth.

integer format: uint32
username

Username for authentication.

string
nullable
password

Password or token for authentication.

string
nullable

Clone result.

object
output
required

Command output text.

string
exit_code
required

Exit code of the git command.

integer format: int32

Bad request – validation error.

object
message
required

Summary message, e.g. “Invalid request”.

string
errors
required
Array<object>
object
field
required

JSON field name that failed validation (e.g. “path”, “command”).

string
error
required

Human-readable description of the validation failure.

string

Unauthorized – invalid or missing API key.

object
message
required

Human-readable error message.

string