You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fresh brew install asks for Github Copilot API key #1154
Check and see if ~/.local/state/opencode/plugin/copilot.ts exists on your system. Experienced the same issue and was able to fix it by copying that file over from one of my Linux machines where OAuth login is working.
I'm having the same issue. I do not have the file @zacharyeller13 mentioned. Completely fresh install from NPM.
I can't get it to prompt me for auth device flow at all, it always prompts for API key.
Edit: Setting "NODE_TLS_REJECT_UNAUTHORIZED=0" fixes this issue for me. It is due to corporate proxy. See #1694 for an issue asking for local trust store support.
I got the same issue (API key asked for Github Copilot) but it was due to a different root cause (silent failure to install npm deps).
Because of a custom npm registry configured on my side, the attempts to install the deps were getting 401 but I was getting 0 error on the UI so I did not know that something was wrong. Like described in this ticket I was then unable, to login to Github Copilot because it was asking for an API key.
Once I fixed my npm registry, everything went like a charm.
I'm guessing that the errors are not caught, that's why there is no error message on the UI. Maybe a good fix would be to display an error message when that happens?
Here's an extract of the logs, showing the 401.
INFO 2026-01-12T12:25:29 +110ms service=bun code=1 s
stdout=bun add v1.3.5 (1e86cebd)
stderr=Resolving dependencies
Resolved, downloaded and extracted [1]
error: GET https://<CUSTOM_NPM_REGISTRY>/@opencode-ai%2fplugin - 401
done
INFO 2026-01-12T12:25:29 +0ms service=bun cmd=["/opt/homebrew/Cellar/opencode/1.1.14/bin/opencode","install"] cwd=/Users/hulius/.config/opencode running
INFO 2026-01-12T12:25:29 +6ms service=bun code=1 stdout=bun add v1.3.5 (1e86cebd)
stderr=Resolving dependencies
Resolved, downloaded and extracted [1]
error: GET https://<CUSTOM_NPM_REGISTRY>/opencode-copilot-auth - 401
done
I'm guessing that the errors are not caught, that's why there is no error message on the UI. Maybe a good fix would be to display an error message when that happens?
Activity
zacharyeller13 commentedon Jul 24, 2025
Check and see if
~/.local/state/opencode/plugin/copilot.tsexists on your system. Experienced the same issue and was able to fix it by copying that file over from one of my Linux machines where OAuth login is working.Clete2 commentedon Aug 7, 2025
I'm having the same issue. I do not have the file @zacharyeller13 mentioned. Completely fresh install from NPM.
I can't get it to prompt me for auth device flow at all, it always prompts for API key.
Edit: Setting "NODE_TLS_REJECT_UNAUTHORIZED=0" fixes this issue for me. It is due to corporate proxy. See #1694 for an issue asking for local trust store support.
rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
hulius commentedon Jan 12, 2026
I got the same issue (API key asked for Github Copilot) but it was due to a different root cause (silent failure to install npm deps).
Because of a custom npm registry configured on my side, the attempts to install the deps were getting 401 but I was getting 0 error on the UI so I did not know that something was wrong. Like described in this ticket I was then unable, to login to Github Copilot because it was asking for an API key.
Once I fixed my npm registry, everything went like a charm.
I'm guessing that the errors are not caught, that's why there is no error message on the UI. Maybe a good fix would be to display an error message when that happens?
Here's an extract of the logs, showing the 401.
I'm on MacOS, v1.1.14 installed with Homebrew.
rekram1-node commentedon Jan 12, 2026
YES
Preserve detached worker share credentials across restarts (anomalyco…