Skip to main content
capsule.git gives you a full Git interface inside a running capsule. Every operation executes the real git binary inside the microVM — there is no reimplementation. This means you get full Git fidelity: all flags, all error messages, and all standard behaviors.

Initialize a repository

Configure user identity

Set a user name and email before making commits. By default, configure_user writes to the global git config inside the capsule:

Stage and commit

Check repository status

status() returns a GitStatus object with the current branch, a clean flag, and a list of changed files:
Each entry in status.files is a FileStatus with three fields:

Branch management

Clone with authentication

Pass username and password to authenticate against a private repository. After a successful clone, Wrenn strips the credentials from the remote URL so they are not persisted in the capsule’s git config:
Use token-based authentication (GitHub personal access tokens, GitLab project tokens, etc.) rather than account passwords. Account passwords are unlikely to work with modern Git hosts that enforce OAuth or two-factor authentication.

Push and pull

Credentials are temporarily embedded in the remote URL for the duration of the operation, then restored to their original value:

Configuration and remotes

Error handling

All git methods raise GitCommandError on a non-zero exit code, or GitAuthError when the remote rejects authentication. Both inherit from GitError and expose .stderr and .exit_code:
GitError and its subclasses are not part of the WrennError hierarchy — they originate from a process exit code, not an HTTP response from the Wrenn API.