Repository navigation
Closed
Description
Description
When trying to run a Github action with the opencode action, it simply fails if the repository is:
- Private
- In an organization
Here's the logs:
Run echo "$HOME/.opencode/bin" >> $GITHUB_PATH
Run opencode github run
Performing one time database migration, may take a few minutes...
sqlite-migration:done
Database migration complete.
Asserting permissions for user LovelessCodes...
permission: admin
Adding reaction...
opencode session ses_REDACTED
Fetching prompt data for PR...
Checking out local branch...
Command failed with code 128: git fetch origin --depth=20 feat/opencode
Creating comment...
fatal: could not read Username for 'https://github.com/': No such device or address
Removing reaction...
Error: fatal: could not read Username for 'https://github.com/': No such device or address
Error: Process completed with exit code 1.
Here's the workflow:
name: opencode-review
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
review:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: anomalyco/opencode/github@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
with:
model: opencode-go/kimi-k2.6
use_github_token: true
prompt: |
Review this pull request:
- Check for code quality issues
- Look for potential bugs
- Suggest improvementsPlugins
None
OpenCode version
1.14.33
Steps to reproduce
- Get an organization on Github
- Get a private repository in that organization on Github
- Run
opencode github installin said repository - Push workflow
- Write
/oc review thisin any pull request on said repository - See it fail
Screenshot and/or share link
No response
Operating System
Ubuntu 24.04
Terminal
Not sure
Metadata
Metadata
Assignees
Labels
No labels
Activity
NishadVadgama commentedon May 10, 2026
@LovelessCodes try this, worked for me. since you already installed OpenCode github app, it will use app's permission and access to setup the review job.
LovelessCodes commentedon May 10, 2026
Worked, thank you so much @NishadVadgama !
arthurfiorette commentedon Jun 11, 2026
In case trying the solution above throws
Error: remote: Duplicate header: "Authorization"error, add this step before to remove the duplicate header: