Skip to main content

Host-side git

v0.1.11

Read-only git operations against a checkout living on the runner host (e.g. /opt/myapp). For remote-GitHub-API work, see the `github-cli` pack. The repo directory must live at GIT_REPO env var on the runner host.

8 allowed by default
Pack ID
git-local
Vendor
emisar
OS
linux
Actions
8
Required binaries. Install these on the host before relying on the pack — an action that calls a missing one fails at run time.
git

Install

emisar pack install fetches this pack, re-validates it, and verifies its content hash against the --hash below — the exact bytes this page was rendered against, so a tampered copy is rejected — before copying it into the runner's packs dir. The command reloads a running daemon itself; no manual restart.

on the runner host
sudo emisar pack install git-local --hash sha256:3d82e21e6c382f9bc36f20c2461efa2cbf9fc5712cdb2ccd2017889f7500dfb1

Setup

Runs read-only git commands against a checkout on the runner host — no credentials needed (nothing fetches or pushes to a remote).

Environment

Set these on the runner host, then add each name to execution.inherit_env so the value reaches the action.

  • GIT_REPO required

    Absolute path to the git checkout on the runner host that every action operates in. Add it to the runner's inherit_env .

Notes

  • The runner uid must own the repository or receive read/traverse access through its group or a persistent ACL. Git's safe.directory only accepts different ownership; it does not grant filesystem access. For another user's private checkout, install a dedicated runner as that owner.

Verify it works

Runs git.status, a low-risk read that confirms the pack can reach its target. Run it on the host once the pack is installed; pack install runs it for you.

on the runner host
sudo emisar pack verify git-local

Install and configure a pack walks through the whole sequence on a host.

Actions 8 total

View on GitHub
  • git.blame_file exec medium Medium — changes state, easily reversible

    git blame -- <path>

    Show per-line authorship for one file. Path is relative to repo root.

    View source on GitHub
  • git.branch_list exec low Low — read-only or trivially reversible

    git branch -av

    List all branches (local + remote-tracking) with last commit.

    View source on GitHub
  • git.diff_head exec medium Medium — changes state, easily reversible

    git diff HEAD

    Show uncommitted changes against HEAD. Capped at 1MB of output.

    View source on GitHub
  • git.log_recent exec low Low — read-only or trivially reversible

    git log -n <N>

    List the last N commits with author + date + subject.

    View source on GitHub
  • git.reflog exec low Low — read-only or trivially reversible

    git reflog -n <N>

    Show local HEAD-movement history. Use to find recent rebases / resets.

    View source on GitHub
  • git.remote_list exec low Low — read-only or trivially reversible

    git remote -v

    List the remote URLs (fetch + push).

    View source on GitHub
  • git.show_commit exec medium Medium — changes state, easily reversible

    git show <ref>

    Show the commit message + diff for one commit ref.

    View source on GitHub
  • git.status exec low Low — read-only or trivially reversible

    git status (porcelain)

    Show working-tree status — uncommitted changes, branch, ahead/behind.

    View source on GitHub