opencode
opencode copied to clipboard
[BUG] opencode github install - "Could not find git repository" in valid git repo
Description
The opencode github install command fails with the error "Could not find git repository" even when executed from inside a valid git repository where git status works correctly.
The .git directory exists, all git commands work as expected, but the opencode github install command cannot detect the repository.
OpenCode version
1.1.13
Steps to reproduce
-
Navigate to a valid git repository:
cd ~/path/to/repo -
Confirm git is working:
git status # Output: On branch master, Your branch is up to date with 'origin/master'. -
Verify
.gitdirectory exists:ls -la .git # Shows valid .git directory with all expected contents -
Run the install command:
opencode github install -
Result: Error message appears:
┌ Install GitHub agent │ ■ Could not find git repository. Please run this command from a git repository.
Screenshot and/or share link
N/A - Error is text-based and reproduced above.
Operating System
macOS 26.2 (Build 25C56)
Terminal
iTerm2
Additional Context
- OpenCode installed via Homebrew (
/opt/homebrew/bin/opencode) - The repository has a remote configured (
origin/master) - All standard git operations work correctly
- Tried running from both the repository root and parent directories with same result