Skip to content

Commit 478c594

Browse files
authored
fix: persist checkout credentials for git push
Remove persist-credentials: false so GITHUB_TOKEN is available for git push. Add docs and troubleshooting.
1 parent 21ee7c6 commit 478c594

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/opencode.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
uses: actions/checkout@v6
2323
with:
2424
fetch-depth: 1
25-
persist-credentials: false
2625

2726
- name: Configure git author
2827
run: |

.opencode/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,18 @@ commits via a `Configure git author` step after checkout:
120120
tasks (implement, edit, create PRs) need this git identity to be set, otherwise
121121
OpenCode cannot commit changes.
122122

123+
### Checkout credentials for push
124+
125+
The workflow intentionally persists checkout credentials so OpenCode write tasks
126+
can push branches. The `persist-credentials` option is left at its default
127+
(`true`).
128+
129+
### Troubleshooting
130+
131+
| Symptom | Likely cause |
132+
|---------|-------------|
133+
| `/oc` can commit but push fails with `could not read Username for 'https://github.com'` | Checkout credentials are not persisted. Ensure `persist-credentials` is not `false` in the `actions/checkout` step. |
134+
123135
### Merge behavior
124136

125137
The workflow does not merge automatically. It opens or updates PRs and reports

0 commit comments

Comments
 (0)