opencode icon indicating copy to clipboard operation
opencode copied to clipboard

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

Open mzealey opened this issue 1 week ago • 8 comments

Description

Trying to make it generate a commit for an issue:

remote: Duplicate header: "Authorization"
fatal: unable to access 'https://github.com/.../': The requested URL returned error: 400
1069 |             await $`git commit -m "${summary}
1070 | 
Creating comment...
1071 | Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"`
1072 |           }
1073 |         }
1074 |         await $`git push -u origin ${branch}`
                      ^
ShellError: Failed with exit code 128
 exitCode: 128,
   stdout: "",
   stderr: "remote: Duplicate header: \"Authorization\"\nfatal: unable to access 'https://github.com/.../': The requested URL returned error: 400\n",
      at new ShellPromise (75:16)
      at BunShell (191:35)
      at pushToNewBranch (src/cli/cmd/github.ts:1074:15)

It should have all the required permissions:

  name: opencode
  
  on:
    issue_comment:
      types: [created]
    pull_request_review_comment:
      types: [created]
  
  permissions:
    id-token: write
    contents: write
    pull-requests: write
    issues: write
  
  jobs:
    opencode:
      if: |
        contains(github.event.comment.body, ' /oc') ||
        startsWith(github.event.comment.body, '/oc') ||
        contains(github.event.comment.body, ' /opencode') ||
        startsWith(github.event.comment.body, '/opencode')
      runs-on: ubuntu-latest
      steps:
        - name: Checkout repository
          uses: actions/checkout@v6
  
        - name: Run opencode
          uses: anomalyco/opencode/github@latest
          env:
            ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          with:
            model: anthropic/claude-opus-4-5

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

github runners

Terminal

No response

mzealey avatar Jan 08 '26 12:01 mzealey