Skip to content

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

@mzealey

Description

@mzealey

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions