Containers
Containers and CI runners can use token-based GitHub authentication. For supported token variables
and precedence, see Auth tokens. The container
still needs git, gh, and shipper installed.
Set a Token
Section titled “Set a Token”Export a token before running Shipper:
export GH_TOKEN=<token>shipper next <issue-or-pr>In GitHub Actions, pass the workflow token into the step or container environment where Shipper runs, as shown below.
The token needs the same access you would grant with gh auth login: repo, read:org, and
workflow.
What Shipper Handles
Section titled “What Shipper Handles”On each CLI or MCP preflight, Shipper:
- Detects
GH_TOKENorGITHUB_TOKEN. - Checks the effective git credential helper for
https://github.com. - Runs
gh auth setup-gitonly when token auth is present and no credential helper is configured. - Writes one line when it makes that change:
Ran `gh auth setup-git` (token auth detected, no git credential helper was configured).If a credential helper already exists, Shipper leaves git config unchanged.
Git Config Side Effect
Section titled “Git Config Side Effect”gh auth setup-git writes a credential.helper entry for GitHub into ~/.gitconfig. That is
usually fine in ephemeral containers because the home directory is discarded with the container. On
shared developer hosts, Shipper checks for any existing helper first and does not overwrite it.
Docker Example
Section titled “Docker Example”Pass the token and mount the repository workspace:
docker run --rm \ -e GH_TOKEN="$GH_TOKEN" \ -v "$(pwd):/workspace" \ -w /workspace \ <image-with-gh-git-and-shipper> \ shipper next <issue-or-pr>The image must include git, gh, and shipper. The mounted workspace should be a GitHub-backed
repo where shipper init has already been run, or a repo where you are running shipper init.
GitHub Actions Example
Section titled “GitHub Actions Example”Pass the workflow token into the Shipper step:
- name: Run shipper env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: shipper next <issue-or-pr>If the job runs inside a custom container, that container still needs git, gh, and shipper
installed.
Manual Fallback
Section titled “Manual Fallback”If Shipper warns that it could not auto-configure the git credential helper, run this manually in the same container and user environment:
gh auth setup-gitShipper continues after the warning so API-only commands can still proceed. Later git clone, fetch, or push operations may fail until the helper is configured.