Skip to content

Conversation

@LeonMueller-OneAndOnly
Copy link
Contributor

Summary

Adds persist-credentials: false to all actions/checkout@v6 steps in workflow templates to prevent the "Duplicate Authorization header" error.

Problem

When using actions/checkout@v6 with the OpenCode GitHub action, users encounter:

remote: Duplicate header: "Authorization"
fatal: unable to access 'https://github.com/...': The requested URL returned error: 400

Root Cause

  1. actions/checkout@v6 persists the GitHub token to git config via http.extraheader
  2. The anomalyco/opencode/github@latest action adds its own authentication
  3. Both Authorization headers get sent to GitHub → 400 error

Solution

Add persist-credentials: false to the checkout step in all workflow templates:

- uses: actions/checkout@v6
  with:
    persist-credentials: false

This prevents the checkout action from persisting credentials, allowing the OpenCode action to handle authentication without conflicts.

Changes

  • packages/opencode/src/cli/cmd/github.ts - CLI-generated workflow template
  • packages/web/src/content/docs/github.mdx - Documentation examples (4 workflows)
  • github/README.md - Manual setup example

Related Issues

Testing

Users experiencing the error can update their workflows to include persist-credentials: false in the checkout step. New users following the setup instructions will get the correct configuration automatically.

Prevents duplicate Authorization header error when using actions/checkout@v6
with the opencode GitHub action. The checkout action persists credentials to
git config, which conflicts with the opencode action's own authentication.

Fixes anomalyco#7325
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@rekram1-node rekram1-node merged commit a092f56 into anomalyco:dev Jan 13, 2026
4 checks passed
dl-alexandre pushed a commit to dl-alexandre/opencode that referenced this pull request Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Github plugin having duplicate Authorization header (problem with private repos?)

2 participants