Novita Sandbox exposes sandbox.git helpers for common repository workflows such as cloning, branching, committing, pulling, pushing, managing remotes, and configuring Git.
Authentication and identity
Inline credentials
For private HTTPS repositories, pass both a username and password/token directly into operations such as push, pull, or clone.
Authenticate once with the Git credential helper
You can use dangerouslyAuthenticate() in JavaScript or dangerously_authenticate() in Python to store credentials inside the sandbox credential helper.
Credentials are written to disk inside the sandbox and can be read by anything with sandbox access.
Credentials may be stored for GitHub by default or for a custom HTTPS host.
Keep credentials in the remote URL
By default, credentials are removed from the remote URL after clone. To retain them in .git/config, set dangerouslyStoreCredentials: true (JS) or dangerously_store_credentials=True (Python).
Credentials kept in a remote URL remain in repo config and are readable by sandbox processes.
You can use configureUser (JS) or configure_user (Python) to set commit author details globally or locally for a repository.
Clone repositories
Supported clone options include destination path, branch selection, depth, username, password, and credential-storage behavior.
Check repository status and branches
You can use status() to inspect current branch, ahead/behind counts, and file status.
You can use branches() to get the branch list and current branch.
Create, switch, and delete branches
Stage and commit changes
You can use add to stage all changes or selected files.
You can use commit to create commits. Options include custom author name, author email, and empty commits.
Pull and push
push and pull can use the configured upstream by default. You can also specify remote, branch, and upstream configuration.
Manage remotes
You can use remoteAdd (JS) or remote_add (Python) to add remotes, optionally fetch after adding, or overwrite an existing remote.
Git configuration
You can use setConfig / set_config and getConfig / get_config to manage Git settings globally or per repository.