Skip to content

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.

Export a token before running Shipper:

Terminal window
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.

On each CLI or MCP preflight, Shipper:

  • Detects GH_TOKEN or GITHUB_TOKEN.
  • Checks the effective git credential helper for https://github.com.
  • Runs gh auth setup-git only 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.

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.

Pass the token and mount the repository workspace:

Terminal window
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.

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.

If Shipper warns that it could not auto-configure the git credential helper, run this manually in the same container and user environment:

Terminal window
gh auth setup-git

Shipper 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.