sandbox_git_clone
Clone a GitHub repository into an E2B cloud sandbox. Supports private repos when a GITHUB_TOKEN is set. Specify the sandbox ID, repository URL, optional destination path, branch, and shallow clone depth.
Instructions
Clone a GitHub repository into a sandbox. Supports private repos when GITHUB_TOKEN is configured.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sandboxId": "<sandboxId>",
"repoUrl": "<repoUrl>"
},
"name": "sandbox_git_clone"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sandboxId | Yes | The sandbox ID. | |
| repoUrl | Yes | Git repository URL (e.g., "https://github.com/user/repo"). | |
| path | No | Clone destination path. Defaults to /home/user/repo. | |
| branch | No | Branch to clone. Defaults to the default branch. | |
| depth | No | Shallow clone depth. Default: 1 for faster cloning. Set 0 for full history. |