Actions30
Git → Push
AI-generatedSummary
Push commits from a git repository located inside an E2B sandbox to a remote repository, optionally setting upstream tracking and authenticating with provided credentials.
Inputs
- Sandbox ID (required) — ID of the E2B sandbox containing the git repository.
- Repository Path (required) — Filesystem path inside the sandbox where the git repository is located.
- Remote Options — Optional settings for the push operation including 'remote' (remote name, e.g., origin), 'branch' (branch name to push), 'username' and 'password' (for HTTPS authentication), and 'setUpstream' (boolean to set upstream tracking).
- Timeout — Timeout in seconds for the operation (default 300 seconds).
Output shape
a single item containing JSON with details about the git push execution result including success, exit code, stdout, stderr, and related repository and branch info.
The operation throws errors if push fails due to authentication issues, missing upstream branch, or other git errors. Providing username requires password if password is set. If credentials are provided, they are temporarily injected into the remote URL for authentication and then restored.
Examples
Example 1: Push commits to the 'origin' remote on branch 'main' with upstream tracking set
Provide sandbox ID, repository path, set remote to 'origin', branch to 'main', username and password for authentication, and enable 'setUpstream'.